Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2c1c5f19 authored by Baruch Siach's avatar Baruch Siach Committed by David Woodhouse
Browse files

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: default avatarBaruch Siach <baruch@tkos.co.il>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent f43272c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment