linux_dsm_epyc7002/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 mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
brcmnand mtd: nand: brcmnand: Change BUG_ON in brcmnand_send_cmd 2016-07-16 20:40:16 -07:00
gpmi-nand gpmi-nand: Handle ECC Errors in erased pages 2016-05-05 23:55:15 +02:00
ams-delta.c mtd: nand: ams-delta: set ECC algorithm explicitly 2016-04-19 22:05:31 +02:00
atmel_nand_ecc.h mtd: atmel_nand: Support 32-bit ECC strength 2016-02-12 10:27:48 -08:00
atmel_nand_nfc.h Revert "mtd: atmel_nand: Support variable RB_EDGE interrupts" 2016-05-25 20:06:28 -07:00
atmel_nand.c Revert "mtd: atmel_nand: Support variable RB_EDGE interrupts" 2016-05-25 20:06:28 -07:00
au1550nd.c mtd: nand: au1550nd: set ECC algorithm explicitly 2016-05-05 23:51:53 +02:00
bf5xx_nand.c mtd: nand: bf5xx: set ECC algorithm explicitly 2016-05-05 23:52:02 +02:00
cafe_nand.c mtd: nand: cafe: switch to mtd_ooblayout_ops 2016-05-05 23:51:39 +02:00
cmx270_nand.c mtd: nand: cmx270: set ECC algorithm explicitly 2016-05-05 23:51:54 +02:00
cs553x_nand.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
davinci_nand.c mtd: nand: davinci: set ECC algorithm explicitly 2016-05-05 23:52:02 +02:00
denali_dt.c mtd: nand: drop owner assignment from platform_drivers 2014-10-20 16:20:58 +02:00
denali_pci.c mtd: denali_pci: switch to dev_err() 2015-08-18 17:21:37 -07:00
denali.c mtd: nand: denali: switch to mtd_ooblayout_ops 2016-05-05 23:51:40 +02:00
denali.h mtd: nand: denali: use the mtd instance embedded in struct nand_chip 2015-12-18 13:13:50 -08:00
diskonchip.c mtd: nand: diskonchip: switch to mtd_ooblayout_ops 2016-05-05 23:51:40 +02:00
docg4.c mtd: nand: docg4: switch to mtd_ooblayout_ops 2016-05-05 23:51:41 +02:00
fsl_elbc_nand.c mtd: nand: fsl_elbc: set ECC algorithm explicitly 2016-05-05 23:51:55 +02:00
fsl_ifc_nand.c mtd: nand: fsl_ifc: set ECC algorithm explicitly 2016-05-05 23:51:55 +02:00
fsl_upm.c mtd: nand: fsl_upm: set ECC algorithm explicitly 2016-05-05 23:51:54 +02:00
fsmc_nand.c mtd: mtd: drop NAND_ECC_SOFT_BCH enum value 2016-05-05 23:55:13 +02:00
gpio.c mtd: nand: gpio: set ECC algorithm explicitly 2016-04-19 22:05:31 +02:00
hisi504_nand.c mtd: nand: hisi504: rely on generic DT parsing done in nand_scan_ident() 2016-05-05 23:51:58 +02:00
jz4740_nand.c mtd: nand: jz4740: Remove unused local variable 2016-05-05 23:51:56 +02:00
jz4780_bch.c mtd: nand: jz4780: Update MODULE_AUTHOR email address 2016-07-11 08:40:19 +02:00
jz4780_bch.h mtd: nand: jz4780: driver for NAND devices on JZ4780 SoCs 2016-01-07 09:35:11 -08:00
jz4780_nand.c mtd: nand: jz4780: Update MODULE_AUTHOR email address 2016-07-11 08:40:19 +02:00
Kconfig This pull request contains only one notable change: 2016-07-15 17:06:26 -07:00
lpc32xx_mlc.c mtd: nand: lpc32xx: switch to mtd_ooblayout_ops 2016-05-05 23:51:45 +02:00
lpc32xx_slc.c mtd: nand: lpc32xx: rely on generic DT parsing done in nand_scan_ident() 2016-05-05 23:51:58 +02:00
Makefile mtd: mediatek: driver for MTK Smart Device 2016-07-11 08:39:54 +02:00
mpc5121_nfc.c mtd: nand: mpc5121_nfc: set ECC algorithm explicitly 2016-05-05 23:51:53 +02:00
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 mtd: nand: remove EXPORT_SYMBOL of nand_scan_bbt() 2016-01-23 14:00:14 -08:00
nand_bch.c mtd: nand_bch: fix spelling of "probably" 2016-05-06 09:45:45 -07:00
nand_ecc.c mtd: nand: return consistent error codes in ecc.correct() implementations 2016-01-06 18:45:46 -08:00
nand_ids.c mtd: nand: add ESMT manufacturer 2016-06-09 21:23:20 +02:00
nand_timings.c mtd: nand: Use ULL-suffix for big u64 constant 2014-08-19 11:53:09 -07:00
nandsim.c MTD updates for v4.7: 2016-05-24 11:00:20 -07:00
ndfc.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
nuc900_nand.c mtd: nand: nuc900: set ECC algorithm explicitly 2016-04-19 22:05:32 +02:00
omap2.c MTD updates for v4.8: 2016-08-02 17:05:11 -04:00
omap_elm.c mtd: omap_elm: print interrupt resource using %pr 2015-12-18 10:16:17 -08:00
orion_nand.c mtd: nand: orion: set ECC algorithm explicitly 2016-04-19 22:05:33 +02:00
pasemi_nand.c mtd: nand: pasemi: switch to dev_* printing functions 2016-04-19 22:05:35 +02:00
plat_nand.c mtd: nand: plat: set ECC algorithm explicitly 2016-04-19 22:05:34 +02:00
pxa3xx_nand.c mtd: nand: pxa3xx: switch to mtd_ooblayout_ops 2016-05-05 23:51:46 +02:00
qcom_nandc.c mtd: nand: qcom: switch to mtd_ooblayout_ops 2016-05-05 23:51:49 +02:00
r852.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
r852.h mtd: nand: r852: use the mtd instance embedded in struct nand_chip 2015-12-18 10:54:41 -08:00
s3c2410.c mtd: nand: s3c2410: set ECC algorithm explicitly 2016-05-05 23:51:52 +02:00
sh_flctl.c mtd: nand: sh_flctl: rely on generic DT parsing done in nand_scan_ident() 2016-05-05 23:51:59 +02:00
sharpsl.c mtd: nand: sharpsl: switch to mtd_ooblayout_ops 2016-05-05 23:51:36 +02:00
sm_common.c mtd: nand: sm_common: switch to mtd_ooblayout_ops 2016-05-05 23:51:48 +02:00
sm_common.h mtd: use __packed shorthand 2014-08-19 11:53:08 -07:00
socrates_nand.c mtd: nand: socrates: set ECC algorithm explicitly 2016-04-19 22:05:35 +02:00
sunxi_nand.c mtd: nand: sunxi: prevent a small memory leak 2016-07-11 08:40:18 +02:00
tmio_nand.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
txx9ndfmc.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
vf610_nfc.c mtd: nand: vf610: switch to mtd_ooblayout_ops 2016-05-05 23:51:48 +02:00
xway_nand.c mtd: nand: xway: add nandaddr to own struct 2016-07-11 08:40:17 +02:00