Skip to content
Commit ded6da21 authored by Frieder Schrempf's avatar Frieder Schrempf Committed by Greg Kroah-Hartman
Browse files

mtd: spinand: Fix incorrect parameters for on-die ECC

The new generic NAND ECC framework stores the configuration and
requirements in separate places since commit 93ef92f6

 ("mtd: nand: Use
the new generic ECC object"). In 5.10.x The SPI NAND layer still uses only
the requirements to track the ECC properties. This mismatch leads to
values of zero being used for ECC strength and step_size in the SPI NAND
layer wherever nanddev_get_ecc_conf() is used and therefore breaks the SPI
NAND on-die ECC support in 5.10.x.

By using nanddev_get_ecc_requirements() instead of nanddev_get_ecc_conf()
for SPI NAND, we make sure that the correct parameters for the detected
chip are used. In later versions (5.11.x) this is fixed anyway with the
implementation of the SPI NAND on-die ECC engine.

Cc: stable@vger.kernel.org # 5.10.x
Reported-by: default avatarvoice INTER connect GmbH <developer@voiceinterconnect.de>
Signed-off-by: default avatarFrieder Schrempf <frieder.schrempf@kontron.de>
Acked-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3b2018f9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment