From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Boris Brezillon <boris.brezillon@bootlin.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Miquel Raynal <miquel.raynal@bootlin.com>,
<linux-mtd@lists.infradead.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
Olivier Schonken <olivier.schonken@gmail.com>,
<stable@vger.kernel.org>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>
Subject: Re: [PATCH] mtd: nand: atmel: Fix get_sectorsize() function
Date: Wed, 28 Mar 2018 10:17:38 +0200 [thread overview]
Message-ID: <5e92b50c-c0d7-c505-b4e0-8a1698371b2a@microchip.com> (raw)
In-Reply-To: <20180327170158.3351-1-boris.brezillon@bootlin.com>
On 27/03/2018 at 19:01, Boris Brezillon wrote:
> get_sectorsize() was not using the appropriate macro to extract the
> ECC sector size from the config cache, which led to buggy ECC when
> using 1024 byte sectors.
>
> Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Cc: <stable@vger.kernel.org>
> Reported-by: Olivier Schonken <olivier.schonken@gmail.com>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks Boris.
Best regards,
Nicolas
> ---
> drivers/mtd/nand/atmel/pmecc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c
> index 8268636675ef..4124bf91bee6 100644
> --- a/drivers/mtd/nand/atmel/pmecc.c
> +++ b/drivers/mtd/nand/atmel/pmecc.c
> @@ -426,7 +426,7 @@ static int get_strength(struct atmel_pmecc_user *user)
>
> static int get_sectorsize(struct atmel_pmecc_user *user)
> {
> - return user->cache.cfg & PMECC_LOOKUP_TABLE_SIZE_1024 ? 1024 : 512;
> + return user->cache.cfg & PMECC_CFG_SECTOR1024 ? 1024 : 512;
> }
>
> static void atmel_pmecc_gen_syndrome(struct atmel_pmecc_user *user, int sector)
>
--
Nicolas Ferre
next prev parent reply other threads:[~2018-03-28 8:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 17:01 [PATCH] mtd: nand: atmel: Fix get_sectorsize() function Boris Brezillon
2018-03-27 18:42 ` Richard Weinberger
2018-03-28 8:17 ` Nicolas Ferre [this message]
2018-03-28 8:24 ` Olivier Schonken
2018-03-29 17:22 ` Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5e92b50c-c0d7-c505-b4e0-8a1698371b2a@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=nicolas.ferre@atmel.com \
--cc=olivier.schonken@gmail.com \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox