commit | 2c1c5f199482356c00f70b6f2f368c3455d1230c | [log] [tgz] |
---|---|---|
author | Baruch Siach <baruch@tkos.co.il> | Wed Mar 09 16:12:20 2011 +0200 |
committer | David Woodhouse <David.Woodhouse@intel.com> | Fri Mar 11 14:23:48 2011 +0000 |
tree | c2f59799e1e9d510980539de6ee998ac937bd5e4 | |
parent | f43272c482661bc88347bba237976eecfc1dbf5b [diff] |
mtd: mxc_nand: fix OOB corruption when page size > 2KiB When page size is 4KiB, ecc.total is set to 8*9, and this causes nand_write_page_hwecc() to read past the initialized part of the eccpos array, which corrupts chip->oob_poi with bogus values from ecc_calc. Fix this by creating a proper nand_ecclayout for 4KiB flashes. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>