[PATCH v2 fix] mtd: gpmi: fix the ecc regression
Huang Shijie
b32955 at freescale.com
Thu Oct 24 01:48:16 PDT 2013
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 at freescale.com>
Cc: stable at vger.kernel.org
---
revert the return value of set_geometry_by_ecc_info().
---
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 3 ++-
1 files changed, 2 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..43a62e8 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -352,7 +352,8 @@ 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
More information about the linux-mtd
mailing list