]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: gpmi: fix ECC regression
authorHuang Shijie <b32955@freescale.com>
Thu, 24 Oct 2013 08:48:16 +0000 (16:48 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 24 Oct 2013 21:44:57 +0000 (14:44 -0700)
commit773d84d28e55fcc64bb1a4d96a85661a7571a83f
tree9244624a095a859f44535d7eb2990d6dcdc8228d
parent18a84e935ef3b283e86426827a2a1d524bb7eb8e
mtd: gpmi: fix ECC regression

The legacy ECC layout uses 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 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
firstly; if it fails, we try to use the new ECC layout.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c