MLC NAND: all 0xff after erase?
Mike Dunn
mikedunn at newsguy.com
Wed Jul 11 12:46:52 EDT 2012
> * My NAND controller's HW ECC flags these erased-page bitflips as
> uncorrectable errors, as there was no ECC written to the page and the
> read data does not match the 0xff special "erased" case. I assume most
Ditto for the newer diskonchips...
> other ECC mechanisms would treat this similarly [2]. In such cases, I
> suspect that the best the driver can do is to return the raw data
> (0xff with flips) and an ECC error message.
>
> * UBI and other FS layers need to distinguish between: (a) 0xff
> cleanly-erased, (b) 0xff with bitflips, and (c) true ECC errors. In
> the end, we may treat (a) and (b) the same (as erased pages), but the
> problem is distinguishing between (b) and (c).
To distinguish between (b) and (c), the docg4 driver dedicates an unused oob
byte as a "page written" flag. This byte is cleared whenever the page is
written. When uncorrectible bitflip errors occur, if more than half of the bits
in this flag are set, the page is assumed to be blank, but with bitflips. In
this case the driver quietly ignores the ecc error, but returns the blank page
data with the bitflips. Not a complete solution, and also specific to one
particular driver, but food for thought. This scheme was actually suggested by
Ivan Djelic.
Mike
More information about the linux-mtd
mailing list