Skip to content

Commit 031e277

Browse files
David Woodhousecomputersforpeace
authored andcommitted
mtd: gpmi: fix ECC regression
The "legacy" ECC layout used until 3.12-rc1 uses all the OOB area by computing the ECC strength and ECC step size ourselves. Commit 2febcdf ("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 <[email protected]> Signed-off-by: Brian Norris <[email protected]> Acked-by: Huang Shijie <[email protected]> Acked-by: Marek Vasut <[email protected]> Tested-by: Marek Vasut <[email protected]>
1 parent 18a84e9 commit 031e277

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/nand/gpmi-nand/gpmi-nand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static int legacy_set_geometry(struct gpmi_nand_data *this)
349349

350350
int common_nfc_set_geometry(struct gpmi_nand_data *this)
351351
{
352-
return set_geometry_by_ecc_info(this) ? 0 : legacy_set_geometry(this);
352+
return legacy_set_geometry(this);
353353
}
354354

355355
struct dma_chan *get_dma_chan(struct gpmi_nand_data *this)

0 commit comments

Comments
 (0)