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: NBaruch Siach <baruch@tkos.co.il> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
Showing
想要评论请 注册 或 登录