]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand/fsmc: Read only 512 + 13 bytes for 8bit NAND devices
authorVipin Kumar <vipin.kumar@st.com>
Wed, 14 Mar 2012 06:17:10 +0000 (11:47 +0530)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:58:25 +0000 (00:58 +0100)
commitf247a104a28be3a32b74cfa694ec53ef86790fc9
tree63df7ffd72eff18739993709768ea86b039e1dbe
parent695cc8dca9fbfe426ae8bb01a0c2612401a338b5
mtd: nand/fsmc: Read only 512 + 13 bytes for 8bit NAND devices

The ECC logic of FSMC works on 512 bytes data + 13 bytes ECC to generate error
indices of up to 8 incorrect bits. The FSMC driver reads 14 instead of 13 oob
bytes to accommodate for 16 bit device as well.

Unfortunately, the internal ecc state machine gets corrupted for 8 bit devices
reading 512 + 14 bytes of data resulting in error indices not getting reported.

Fix this by reading 14 bytes only for 16 bit devices

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/fsmc_nand.c