[PATCH v2 2/2] mtd: rawnand: vf610_nfc: fix false bitflips on reads of erased pages
Miquel Raynal
miquel.raynal at bootlin.com
Mon Aug 31 05:23:07 PDT 2026
On 31/08/2026 at 13:40:00 +02, Mehmet Fide <mehmet.fide at gmail.com> wrote:
> Hi Miquel,
>
>> chip.ecc.size is not covering the whole data buffer. You should be
>> reading mtd->writesize + mtd->oobsize, no? Otherwise you only overwrite
>> the first ECC step (out of 2/4/8 depending on the configuration of
>> the ECC engine).
>
> On this controller there is only ever one step: attach_chip() rejects
> any hwecc setup where ecc.size differs from the page size ("Step size
> needs to be page size") and the engine protects the whole page in one
> go, so ecc.size always equals the full data area here. But you are
> right that mtd->writesize says that much more clearly, so I will use it
> in v3.
Ah ok, then yes that would be nice.
>> Unrelated, but this comment is wrong, we accept up to <strength>
>> bitflips. Not a big deal though, the impact is very limited.
>
> I will reword that comment in v3 to match what the code actually passes
> (the driver's historic threshold of half the strength). If you would
> rather see the threshold itself aligned to <strength>, I can send that
> as a separate cleanup so it does not hide in a fix.
Do not hide it indeed, let the threshold as it is for this series. If
you want, you may send a patch to increase that threshold.
Thanks,
Miquèl
More information about the linux-mtd
mailing list