linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: vf610: set correct ooblayout
@ 2018-02-09 12:21 Stefan Agner
  2018-02-12 21:22 ` Boris Brezillon
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2018-02-09 12:21 UTC (permalink / raw)
  To: boris.brezillon
  Cc: computersforpeace, dwmw2, marek.vasut, cyrille.pitchen, richard,
	linux-mtd, stefan, stable

With commit 3cf32d180227 ("mtd: nand: vf610: switch to
mtd_ooblayout_ops") the driver started to use the NAND cores
default large page ooblayout. However, shortly after commit
6a623e076944 ("mtd: nand: add ooblayout for old hamming layout")
changed the default layout to the old hamming layout, which is
not what vf610_nfc is using. Specify the default large page
layout explicitly.

Fixes: 6a623e076944 ("mtd: nand: add ooblayout for old hamming layout")
Cc: <stable@vger.kernel.org> # v4.12+
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 drivers/mtd/nand/vf610_nfc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
index 80d31a58e558..f367144f3c6f 100644
--- a/drivers/mtd/nand/vf610_nfc.c
+++ b/drivers/mtd/nand/vf610_nfc.c
@@ -752,10 +752,8 @@ static int vf610_nfc_probe(struct platform_device *pdev)
 		if (mtd->oobsize > 64)
 			mtd->oobsize = 64;
 
-		/*
-		 * mtd->ecclayout is not specified here because we're using the
-		 * default large page ECC layout defined in NAND core.
-		 */
+		/* Use default large page ECC layout defined in NAND core */
+		mtd_set_ooblayout(mtd, &nand_ooblayout_lp_ops);
 		if (chip->ecc.strength == 32) {
 			nfc->ecc_mode = ECC_60_BYTE;
 			chip->ecc.bytes = 60;
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: nand: vf610: set correct ooblayout
  2018-02-09 12:21 [PATCH] mtd: nand: vf610: set correct ooblayout Stefan Agner
@ 2018-02-12 21:22 ` Boris Brezillon
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-02-12 21:22 UTC (permalink / raw)
  To: Stefan Agner
  Cc: boris.brezillon, richard, marek.vasut, linux-mtd, stable,
	cyrille.pitchen, computersforpeace, dwmw2

On Fri,  9 Feb 2018 13:21:42 +0100
Stefan Agner <stefan@agner.ch> wrote:

> With commit 3cf32d180227 ("mtd: nand: vf610: switch to
> mtd_ooblayout_ops") the driver started to use the NAND cores
> default large page ooblayout. However, shortly after commit
> 6a623e076944 ("mtd: nand: add ooblayout for old hamming layout")
> changed the default layout to the old hamming layout, which is
> not what vf610_nfc is using. Specify the default large page
> layout explicitly.

Applied.

Thanks,

Boris

> 
> Fixes: 6a623e076944 ("mtd: nand: add ooblayout for old hamming layout")
> Cc: <stable@vger.kernel.org> # v4.12+
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  drivers/mtd/nand/vf610_nfc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
> index 80d31a58e558..f367144f3c6f 100644
> --- a/drivers/mtd/nand/vf610_nfc.c
> +++ b/drivers/mtd/nand/vf610_nfc.c
> @@ -752,10 +752,8 @@ static int vf610_nfc_probe(struct platform_device *pdev)
>  		if (mtd->oobsize > 64)
>  			mtd->oobsize = 64;
>  
> -		/*
> -		 * mtd->ecclayout is not specified here because we're using the
> -		 * default large page ECC layout defined in NAND core.
> -		 */
> +		/* Use default large page ECC layout defined in NAND core */
> +		mtd_set_ooblayout(mtd, &nand_ooblayout_lp_ops);
>  		if (chip->ecc.strength == 32) {
>  			nfc->ecc_mode = ECC_60_BYTE;
>  			chip->ecc.bytes = 60;



-- 
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-12 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-09 12:21 [PATCH] mtd: nand: vf610: set correct ooblayout Stefan Agner
2018-02-12 21:22 ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).