Single bit error correction on NAND.
tglx at linutronix.de
Thu Jul 28 17:06:43 EDT 2005
On Thu, 2005-07-28 at 16:40 -0300, DataCom - Virgílio wrote:
> I have noticed that NAND support on MTD can detect/correct single bit errors
> in 256 bytes, using software ECC. However, the correct data is not written
> back to flash. In other words, the bit stays "flipped" in flash. Isn't that
> dangerous? I mean, if another bitflip occurs in the same 256 bytes, we won't
> be able to correct by software ECC...
> Am I missing something here?
It is not and can not be the responsibility of the NAND driver to handle
this. Where to should it write the data ? The existing data _cannot_ be
overwritten, without erasing the whole eraseblock and the implied risk
of loosing _ALL_ the data on the block due to a powerfail.
The NAND driver returns the corrected data and an appropriate error code
and the calling (e.g. filesystem) driver has to deal with the data
copying or whatever the developer has decided to be the correct
The NAND driver provides only the lowest level of access to the flash
More information about the linux-mtd