AW: [PATCH v2 2/2] mtd: nand: realtek-ecc: Add Realtek external ECC engine support
markus.stockhausen at gmx.de
markus.stockhausen at gmx.de
Wed Sep 10 08:48:20 PDT 2025
> Von: Miquel Raynal <miquel.raynal at bootlin.com>
> Gesendet: Mittwoch, 10. September 2025 10:43
>
> > + ret = FIELD_GET(RTL_ECC_RESULT, status);
> > + all_one = FIELD_GET(RTL_ECC_ALL_ONE, status);
>
> Maybe you should check whether all_one remains true if there are
> correctable bitflips in your buffer (you may use nandflipbits for that
> purpose). If not, you shall probably spend extra time when checking for
> ret checking if there are less bitflips than the ECC controller can
> correct compared to ones in the *entire* buffer, which would indicate
> that you are really in the presence of an erased page, see:
> https://elixir.bootlin.com/linux/v6.16.5/source/drivers/mtd/nand/raw/nand_base.c#L2841
>
> This helper may be moved if you need it.
ECC engine cannot handle bitflips in erased blocks.
Seems as this helper really can increase robustness
in this case. I will make use of it in the next version.
What do you mean by "can be moved"?
Markus
More information about the linux-mtd
mailing list