mtd: gpmi: fix ECC regression

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Oct 25 10:59:01 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=fddd3adba4bef19eb504ac75c65875b9a7be6949
Commit:     fddd3adba4bef19eb504ac75c65875b9a7be6949
Parent:     18a84e935ef3b283e86426827a2a1d524bb7eb8e
Author:     David Woodhouse <David.Woodhouse at intel.com>
AuthorDate: Fri Oct 25 15:03:59 2013 +0100
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Oct 25 15:05:40 2013 +0100

    mtd: gpmi: fix ECC regression
    
    The "legacy" ECC layout used until 3.11 uses all the OOB area by
    computing the ECC strength and ECC step size ourselves.
    
    Commit 2febcdf84b ("mtd: gpmi: set the BCHs geometry with the ecc info")
    makes the driver 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 causes a regression:
    
       We can not mount the ubifs which was created by the old NAND ECC layout.
    
    This patch fixes this issue by reverting to the legacy ECC layout.
    
    We will probably introduce a new device-tree property to indicate that
    the new ECC layout can be used. For now though, for the imminent 3.12
    release, we just unconditionally revert to the 3.11 behaviour.
    
    This leaves a harmless cosmetic warning about an unused function. At
    this point in the cycle I really don't care.
    
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
    Acked-by: Huang Shijie <b32955 at freescale.com>
    Acked-by: Marek Vasut <marex at denx.de>
    Tested-by: Marek Vasut <marex at denx.de>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 59ab069..a9830ff 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -349,7 +349,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);
 }
 
 struct dma_chan *get_dma_chan(struct gpmi_nand_data *this)



More information about the linux-mtd-cvs mailing list