linux_dsm_epyc7002/drivers/mtd/nand/raw
Marco Felsch 8493b2a06f mtd: rawnand: micron: handle on-die "ECC-off" devices correctly
Some devices are not supposed to support on-die ECC but experience
shows that internal ECC machinery can actually be enabled through the
"SET FEATURE (EFh)" command, even if a read of the "READ ID Parameter
Tables" returns that it is not.

Currently, the driver checks the "READ ID Parameter" field directly
after having enabled the feature. If the check fails it returns
immediately but leaves the ECC on. When using buggy chips like
MT29F2G08ABAGA and MT29F2G08ABBGA, all future read/program cycles will
go through the on-die ECC, confusing the host controller which is
supposed to be the one handling correction.

To address this in a common way we need to turn off the on-die ECC
directly after reading the "READ ID Parameter" and before checking the
"ECC status".

Cc: stable@vger.kernel.org
Fixes: dbc44edbf8 ("mtd: rawnand: micron: Fix on-die ECC detection logic")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-08-03 02:00:01 +02:00
..
atmel treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
bcm47xxnflash treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
brcmnand mtd: rawnand: brcmnand: Add support for v7.3 controller 2019-06-27 20:06:41 +02:00
gpmi-nand mtd: rawnand: gpmi: remove double assignment to block_size 2019-06-27 20:06:42 +02:00
ingenic mtd: rawnand: ingenic: Fix ingenic_ecc dependency 2019-07-01 14:50:38 +02:00
ams-delta.c mtd: rawnand: ams-delta: Use GPIO API for data I/O 2018-12-07 10:38:27 +01:00
au1550nd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cafe_nand.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
cmx270_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cs553x_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
davinci_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
denali_dt.c mtd: rawnand: denali: decouple controller and NAND chips 2019-04-18 08:54:03 +02:00
denali_pci.c mtd: rawnand: denali: decouple controller and NAND chips 2019-04-18 08:54:03 +02:00
denali.c mtd: rawnand: denali: clean up coding style 2019-04-18 08:54:04 +02:00
denali.h mtd: rawnand: denali: decouple controller and NAND chips 2019-04-18 08:54:03 +02:00
diskonchip.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
fsl_elbc_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fsl_ifc_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fsl_upm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsmc_nand.c mtd: rawnand: fsmc: Use nand_op_trace for operation tracing 2019-06-27 20:05:26 +02:00
gpio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
hisi504_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
internals.h mtd: rawnand: Support bad block markers in first, second or last page 2019-04-18 08:54:08 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lpc32xx_mlc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
lpc32xx_slc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
Makefile mtd: rawnand: fix build dependency 2019-04-18 08:54:01 +02:00
marvell_nand.c This pull request contains the following changes for MTD: 2019-05-12 17:57:52 -04:00
meson_nand.c mtd: rawnand: meson: only initialize the RB completion once 2019-04-18 08:54:07 +02:00
mpc5121_nfc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
mtk_ecc.c mtd: rawnand: mtk: Re-license MTK NAND driver as Dual MIT/GPL 2019-06-27 20:07:46 +02:00
mtk_ecc.h mtd: rawnand: mtk: Re-license MTK NAND driver as Dual MIT/GPL 2019-06-27 20:07:46 +02:00
mtk_nand.c mtd: rawnand: mtk: Re-license MTK NAND driver as Dual MIT/GPL 2019-06-27 20:07:46 +02:00
mxc_nand.c mtd: rawnand: Deprecate the dummy_controller field 2018-12-07 10:58:11 +01:00
nand_amd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
nand_base.c This pull-request contains the following changes for MTD: 2019-07-13 15:42:44 -07:00
nand_bbt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
nand_bch.c mtd: rawnand: Use kzalloc() instead of kmalloc() and memset() 2019-06-28 12:00:46 +02:00
nand_ecc.c docs: mtd: move it to the driver-api book 2019-07-15 09:20:28 -03:00
nand_esmt.c mtd: rawnand: ESMT: Also use the last page for bad block markers 2019-04-18 08:54:08 +02:00
nand_hynix.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
nand_ids.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
nand_jedec.c mtd: rawnand: Get rid of chip->ecc_{strength,step}_ds 2019-04-08 10:21:16 +02:00
nand_legacy.c mtd: rawnand: Annotate implicit fall through in nand_command/nand_command_lp 2019-02-05 16:56:10 +01:00
nand_macronix.c mtd: rawnand: Add Macronix NAND read retry support 2019-06-27 20:06:40 +02:00
nand_micron.c mtd: rawnand: micron: handle on-die "ECC-off" devices correctly 2019-08-03 02:00:01 +02:00
nand_onfi.c mtd: rawnand: Get rid of chip->ecc_{strength,step}_ds 2019-04-08 10:21:16 +02:00
nand_samsung.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
nand_timings.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
nand_toshiba.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
nandsim.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 150 2019-05-30 11:25:19 -07:00
ndfc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
nuc900_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
omap2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap_elm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
orion_nand.c mtd: rawnand: Deprecate ->chip_delay 2018-10-03 11:12:25 +02:00
oxnas_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pasemi_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
plat_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
qcom_nandc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
r852.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
r852.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
s3c2410.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sh_flctl.c mtd: nand: Make flags for bad block marker position more granular 2019-04-18 08:54:07 +02:00
sharpsl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sm_common.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sm_common.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
socrates_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
stm32_fmc2_nand.c mtd: rawnand: stm32_fmc2: increase DMA completion timeouts 2019-06-28 12:01:53 +02:00
sunxi_nand.c mtd: rawnand: sunxi: Add A23/A33 DMA support with extra MBUS configuration 2019-07-05 22:30:58 +02:00
tango_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tegra_nand.c mtd: rawnand: Get rid of chip->ecc_{strength,step}_ds 2019-04-08 10:21:16 +02:00
tmio_nand.c mtd: rawnand: Stop using chip->state in drivers 2019-02-05 15:39:40 +01:00
txx9ndfmc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vf610_nfc.c mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized 2019-05-14 19:52:48 -07:00
xway_nand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00