From: Richard Weinberger <richard@nod.at>
To: Boris Brezillon <boris.brezillon@bootlin.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
linux-mtd@lists.infradead.org,
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
Subject: Re: [PATCH] mtd: nand: atmel: Fix get_sectorsize() function
Date: Tue, 27 Mar 2018 20:42:57 +0200 [thread overview]
Message-ID: <8243180.0gKHKBdRfY@blindfold> (raw)
In-Reply-To: <20180327170158.3351-1-boris.brezillon@bootlin.com>
Am Dienstag, 27. März 2018, 19:01:58 CEST schrieb Boris Brezillon:
> 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>
> ---
> 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)
Reviewed-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: Boris Brezillon <boris.brezillon@bootlin.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
linux-mtd@lists.infradead.org,
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
Subject: Re: [PATCH] mtd: nand: atmel: Fix get_sectorsize() function
Date: Tue, 27 Mar 2018 20:42:57 +0200 [thread overview]
Message-ID: <8243180.0gKHKBdRfY@blindfold> (raw)
In-Reply-To: <20180327170158.3351-1-boris.brezillon@bootlin.com>
Am Dienstag, 27. M�rz 2018, 19:01:58 CEST schrieb Boris Brezillon:
> 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>
> ---
> 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)
Reviewed-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
next prev parent reply other threads:[~2018-03-27 18:43 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 [this message]
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
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=8243180.0gKHKBdRfY@blindfold \
--to=richard@nod.at \
--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=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.