]> Gentwo Git Trees - linux/.git/commit
mtd: rawnand: Ensure ECC configuration is propagated to upper layers
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 7 May 2024 08:58:42 +0000 (10:58 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 27 May 2024 11:42:19 +0000 (13:42 +0200)
commit3a1b777eb9fb75d09c45ae5dd1d007eddcbebf1f
tree834fc752582fae21906a5c592d5f79a1055e77d4
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
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: 8c126720fe10 ("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
drivers/mtd/nand/raw/nand_base.c