kernel_samsung_a53x/drivers/mtd/nand/raw
Miquel Raynal f74b518187 mtd: rawnand: arasan: Ensure program page operations are successful
commit 3a4a893dbb19e229db3b753f0462520b561dee98 upstream.

The NAND core complies with the ONFI specification, which itself
mentions that after any program or erase operation, a status check
should be performed to see whether the operation was finished *and*
successful.

The NAND core offers helpers to finish a page write (sending the
"PAGE PROG" command, waiting for the NAND chip to be ready again, and
checking the operation status). But in some cases, advanced controller
drivers might want to optimize this and craft their own page write
helper to leverage additional hardware capabilities, thus not always
using the core facilities.

Some drivers, like this one, do not use the core helper to finish a page
write because the final cycles are automatically managed by the
hardware. In this case, the additional care must be taken to manually
perform the final status check.

Let's read the NAND chip status at the end of the page write helper and
return -EIO upon error.

Cc: Michal Simek <michal.simek@amd.com>
Cc: stable@vger.kernel.org
Fixes: 88ffef1b65cf ("mtd: rawnand: arasan: Support the hardware BCH ECC engine")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/linux-mtd/20230717194221.229778-2-miquel.raynal@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 11:26:18 +01:00
..
atmel Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm47xxnflash Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
brcmnand Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpmi-nand Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ingenic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ams-delta.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arasan-nand-controller.c mtd: rawnand: arasan: Ensure program page operations are successful 2024-11-08 11:26:18 +01:00
au1550nd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cadence-nand-controller.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cafe_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cs553x_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
davinci_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
denali.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
denali.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
denali_dt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
denali_pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
diskonchip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_elbc_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_ifc_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_upm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsmc_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hisi504_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
internals.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc32xx_mlc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc32xx_slc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
marvell_nand.c mtd: rawnand: marvell: Ensure program page operations are successful 2024-11-08 11:26:18 +01:00
meson_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpc5121_nfc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_ecc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_ecc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxc_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxic_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_amd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_base.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_bbt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_bch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_ecc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_esmt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_hynix.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_ids.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_jedec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_legacy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_macronix.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_micron.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_onfi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_samsung.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_timings.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nand_toshiba.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nandsim.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ndfc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omap2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omap_elm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
orion_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oxnas_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pasemi_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
plat_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom_nandc.c mtd: rawnand: qcom: Unmap the right resource upon probe failure 2024-11-08 11:26:18 +01:00
r852.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
r852.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s3c2410.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh_flctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sharpsl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sm_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sm_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
socrates_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32_fmc2_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunxi_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tango_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tegra_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tmio_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
txx9ndfmc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vf610_nfc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xway_nand.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00