public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH V2] mtd: gpmi: fix the ecc regression
@ 2013-10-24  8:14 Huang Shijie
  2013-10-24  8:48 ` [PATCH v2 fix] " Huang Shijie
  2013-10-25 12:03 ` [PATCH V2] " David Woodhouse
  0 siblings, 2 replies; 13+ messages in thread
From: Huang Shijie @ 2013-10-24  8:14 UTC (permalink / raw)
  To: dwmw2
  Cc: dedekind1, tharvey, stable, Huang Shijie, linux-mtd,
	computersforpeace

The legacy ecc layout is to use all the OOB area by computing the ecc strength
and ecc step size ourselves.

The patch "2febcdf mtd: gpmi: set the BCHs geometry with the ecc info"
makes the gpmi to use the ECC info(ecc strength and ecc step size)
provided by the MTD code, and creates a different NAND ecc layout
for the BCH , and use the new ecc layout, this brings a regression to us:
   We can not mount the ubifs which was created by the old NAND ecc layout.

This patch fixes this issue by use the legacy ecc layout firstly, if it fails
we try to use the new ecc layout.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Cc: stable@vger.kernel.org
---
v1 --> v2:
	[0] remove the DT binding.
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 6807d7c..f9ee7e5 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -352,7 +352,7 @@ static int legacy_set_geometry(struct gpmi_nand_data *this)
 
 int common_nfc_set_geometry(struct gpmi_nand_data *this)
 {
-	return set_geometry_by_ecc_info(this) ? 0 : legacy_set_geometry(this);
+	return legacy_set_geometry(this) ? set_geometry_by_ecc_info(this) : 0;
 }
 
 struct dma_chan *get_dma_chan(struct gpmi_nand_data *this)
-- 
1.7.2.rc3

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

end of thread, other threads:[~2013-10-25 17:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-24  8:14 [PATCH V2] mtd: gpmi: fix the ecc regression Huang Shijie
2013-10-24  8:48 ` [PATCH v2 fix] " Huang Shijie
2013-10-24 22:19   ` Brian Norris
2013-10-25 13:36     ` David Woodhouse
2013-10-25 12:03 ` [PATCH V2] " David Woodhouse
2013-10-25 12:20   ` David Woodhouse
2013-10-25 13:22     ` Marek
2013-10-26  1:33     ` Huang Shijie
2013-10-25 13:29       ` David Woodhouse
2013-10-25 13:38         ` Marek
2013-10-26  1:41         ` Huang Shijie
2013-10-25 14:08           ` David Woodhouse
2013-10-25 17:08             ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox