UBI Static Volume CRC Corruption

Kyle Abramowitz <[email protected]>
Newsgroups org.infradead.lists.linux-mtd
Message-ID <CAAbNe083MrxKmSB4JN8WhO+Gjomgt46k4CLi1k0D8kQ0GpTVGQ@mail.gmail.com>
Hello,

I am working on a NAND driver for an MT7620A and a Winbond W29N01HV

Something unusual came up in testing. An erase block that is bad, but not
yet marked bad is causing `ubiupdatevol` to report CRC corruption on its
validation pass for static volumes. The write and erase functions do not return
any errors as they do not do any sort of readback validation. This
seems consistent
with other drivers I see in the tree (Kernel 6.12).

The issue we are running into is that we expected UBI to torture this block once
it was discovered to have unrecoverable ECC errors. But after tracing
through the
code, we found that the scrubbing step is skipped in this case and no
torture happens
so this block never gets marked as bad.

My questions are: what is the proper way to handle this? What should
happen on a freshly
discovered bad block that has not been marked yet? Is it intended that
scrubbing and torturing
is skipped on crc failures in `ubi_eba_read_leb()`?

My hope was that it would get marked bad eventually and remapped to a
new PEB so a future
write would succeed.

Thank you!

Kyle

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.