From: Baruch Siach Date: Wed, 9 Mar 2011 14:12:20 +0000 (+0200) Subject: mtd: mxc_nand: fix OOB corruption when page size > 2KiB X-Git-Tag: v2.6.39-rc1~40^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c1c5f199482356c00f70b6f2f368c3455d1230c;p=pandora-kernel.git 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 Acked-by: Sascha Hauer Signed-off-by: David Woodhouse --- Reading git-diff-tree failed