linux/drivers/mtd/nand
Miquel Raynal 3a1b777eb9 mtd: rawnand: Ensure ECC configuration is propagated to upper layers
Until recently the "upper layer" was MTD. But following incremental
reworks to bring spi-nand support and more recently generic ECC support,
there is now an intermediate "generic NAND" layer that also needs to get
access to some values. When using "converted" ECC engines, like the
software ones, these values are already propagated correctly. But
otherwise when using good old raw NAND controller drivers, we need to
manually set these values ourselves at the end of the "scan" operation,
once these values have been negotiated.

Without this propagation, later (generic) checks like the one warning
users that the ECC strength is not high enough might simply no longer
work.

Fixes: 8c126720fe ("mtd: rawnand: Use the ECC framework nand_ecc_is_strong_enough() helper")
Cc: stable@vger.kernel.org
Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
Closes: https://lore.kernel.org/all/Zhe2JtvvN1M4Ompw@pengutronix.de/
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/linux-mtd/20240507085842.108844-1-miquel.raynal@bootlin.com
2024-05-27 13:42:19 +02:00
..
onenand Raw NAND core changes: 2023-08-28 16:37:38 +02:00
raw mtd: rawnand: Ensure ECC configuration is propagated to upper layers 2024-05-27 13:42:19 +02:00
spi MTD 2024-03-15 12:29:57 -07:00
bbt.c mtd: nand: bbt: Use the bitmap API to allocate bitmaps 2022-09-20 10:06:58 +02:00
core.c mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase() 2022-11-07 17:17:20 +01:00
ecc-mtk.c mtd: nand: ecc-mtk: Add ECC support fot MT7986 IC 2023-02-03 19:09:44 +01:00
ecc-mxic.c mtd: Explicitly include correct DT includes 2023-07-27 17:03:41 +02:00
ecc-sw-bch.c mtd: nand: ecc-bch: Use the public nsteps field 2021-03-11 09:37:28 +01:00
ecc-sw-hamming.c mtd: rawnand: Let callers use the bare Hamming helpers 2021-10-15 12:20:59 +02:00
ecc.c mtd: Explicitly include correct DT includes 2023-07-27 17:03:41 +02:00
Kconfig mtd: nand: MTD_NAND_ECC_MEDIATEK should depend on ARCH_MEDIATEK 2022-05-12 16:43:04 +02:00
Makefile mtd: nand: make mtk_ecc.c a separated module 2022-04-27 18:12:35 +02:00