linux/drivers/mtd/nand
Lothar Waßmann 38178e7b88 mtd: nand: mxc: fix obiwan error in mxc_nand_v[12]_ooblayout_free() functions
commit a894cf6c5a ("mtd: nand: mxc: switch to mtd_ooblayout_ops")
introduced a regression accessing the OOB area from the mxc_nand
driver due to an Obiwan error in the mxc_nand_v[12]_ooblayout_free()
functions. They report a bogus oobregion { 64, 7 } which leads to
errors accessing bogus data when reading the oob area.

Prior to the commit the mtd-oobtest module could be run without any
errors. With the offending commit, this test fails with results like:
|Running mtd-oobtest
|
|=================================================
|mtd_oobtest: MTD device: 5
|mtd_oobtest: MTD device size 524288, eraseblock size 131072, page size 2048, count of eraseblocks 4, pages per eraseblock 64, OOB size 64
|mtd_test: scanning for bad eraseblocks
|mtd_test: scanned 4 eraseblocks, 0 are bad
|mtd_oobtest: test 1 of 5
|mtd_oobtest: writing OOBs of whole device
|mtd_oobtest: written up to eraseblock 0
|mtd_oobtest: written 4 eraseblocks
|mtd_oobtest: verifying all eraseblocks
|mtd_oobtest: error @addr[0x0:0x19] 0x9a -> 0x78 diff 0xe2
|mtd_oobtest: error @addr[0x0:0x1a] 0xcc -> 0x0 diff 0xcc
|mtd_oobtest: error @addr[0x0:0x1b] 0xe0 -> 0x85 diff 0x65
|mtd_oobtest: error @addr[0x0:0x1c] 0x60 -> 0x62 diff 0x2
|mtd_oobtest: error @addr[0x0:0x1d] 0x69 -> 0x45 diff 0x2c
|mtd_oobtest: error @addr[0x0:0x1e] 0xcd -> 0xa0 diff 0x6d
|mtd_oobtest: error @addr[0x0:0x1f] 0xf2 -> 0x60 diff 0x92
|mtd_oobtest: error: verify failed at 0x0
[...]

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Fixes: a894cf6c5a ("mtd: nand: mxc: switch to mtd_ooblayout_ops")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2016-09-19 11:57:12 +02:00
..
bcm47xxnflash
brcmnand mtd: nand: brcmnand: Change BUG_ON in brcmnand_send_cmd 2016-07-16 20:40:16 -07:00
gpmi-nand
Kconfig This pull request contains only one notable change: 2016-07-15 17:06:26 -07:00
Makefile mtd: mediatek: driver for MTK Smart Device 2016-07-11 08:39:54 +02:00
ams-delta.c
atmel_nand.c Revert "mtd: atmel_nand: Support variable RB_EDGE interrupts" 2016-05-25 20:06:28 -07:00
atmel_nand_ecc.h
atmel_nand_nfc.h Revert "mtd: atmel_nand: Support variable RB_EDGE interrupts" 2016-05-25 20:06:28 -07:00
au1550nd.c
bf5xx_nand.c
cafe_nand.c
cmx270_nand.c
cs553x_nand.c
davinci_nand.c
denali.c
denali.h
denali_dt.c
denali_pci.c
diskonchip.c
docg4.c
fsl_elbc_nand.c
fsl_ifc_nand.c
fsl_upm.c
fsmc_nand.c
gpio.c
hisi504_nand.c
jz4740_nand.c
jz4780_bch.c mtd: nand: jz4780: Update MODULE_AUTHOR email address 2016-07-11 08:40:19 +02:00
jz4780_bch.h
jz4780_nand.c mtd: nand: jz4780: Update MODULE_AUTHOR email address 2016-07-11 08:40:19 +02:00
lpc32xx_mlc.c
lpc32xx_slc.c
mpc5121_nfc.c
mtk_ecc.c mtd: nand: fix generating over-boundary ECC data when writing 2016-09-19 11:56:33 +02:00
mtk_ecc.h mtd: mediatek: driver for MTK Smart Device 2016-07-11 08:39:54 +02:00
mtk_nand.c mtd: nand: fix chances to create incomplete ECC data when writing 2016-09-19 11:57:04 +02:00
mxc_nand.c mtd: nand: mxc: fix obiwan error in mxc_nand_v[12]_ooblayout_free() functions 2016-09-19 11:57:12 +02:00
nand_base.c mtd: nand: fix bug writing 1 byte less than page size 2016-07-19 12:54:14 -07:00
nand_bbt.c
nand_bch.c
nand_ecc.c
nand_ids.c mtd: nand: add ESMT manufacturer 2016-06-09 21:23:20 +02:00
nand_timings.c
nandsim.c
ndfc.c
nuc900_nand.c
omap2.c MTD updates for v4.8: 2016-08-02 17:05:11 -04:00
omap_elm.c
orion_nand.c
pasemi_nand.c
plat_nand.c
pxa3xx_nand.c
qcom_nandc.c
r852.c
r852.h
s3c2410.c
sh_flctl.c
sharpsl.c
sm_common.c
sm_common.h
socrates_nand.c
sunxi_nand.c mtd: nand: sunxi: prevent a small memory leak 2016-07-11 08:40:18 +02:00
tmio_nand.c
txx9ndfmc.c
vf610_nfc.c
xway_nand.c mtd: nand: xway: add nandaddr to own struct 2016-07-11 08:40:17 +02:00