From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Boris Brezillon <boris.brezillon@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Miquel Raynal <miquel.raynal@bootlin.com>,
linux-mtd@lists.infradead.org
Cc: stable@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
Olivier Schonken <olivier.schonken@gmail.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] mtd: nand: atmel: Fix get_sectorsize() function
Date: Thu, 29 Mar 2018 19:22:52 +0200 [thread overview]
Message-ID: <20180329192252.1380fa25@bbrezillon> (raw)
In-Reply-To: <20180327170158.3351-1-boris.brezillon@bootlin.com>
On Tue, 27 Mar 2018 19:01:58 +0200
Boris Brezillon <boris.brezillon@bootlin.com> 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>
Applied.
> ---
> 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)
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2018-03-29 17:23 UTC|newest]
Thread overview: 6+ 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-27 18:42 ` Richard Weinberger
2018-03-28 8:17 ` Nicolas Ferre
2018-03-28 8:24 ` Olivier Schonken
2018-03-29 17:22 ` Boris Brezillon [this message]
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=20180329192252.1380fa25@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=alexandre.belloni@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.