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)
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

Simple merge