mtd: mxc_nand: limit the size of used oob
authorBaruch Siach <baruch@tkos.co.il>
Wed, 13 May 2015 08:17:37 +0000 (11:17 +0300)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 20 May 2015 22:29:53 +0000 (15:29 -0700)
commit7e7e4730c178f32a14b781f7c55564d99c4dda3f
treea520f4ca2e0102b90c6bc0fed7f6b3d85d666c46
parent35d5d20efad8a04c8c002c7f31241dff973977a6
mtd: mxc_nand: limit the size of used oob

For 4k pages the i.MX NFC hardware uses no more than 218 bytes for 8bit ECC
data. Larger oobsize confuses the logic of copy_spare(). Limit the size of used
oob size to avoid that.

Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/mxc_nand.c