[NAND flash driver] What would mtd do if read returns -EBADMSG (ecc failed)

Ricard Wanderlof ricard.wanderlof at axis.com
Tue Oct 21 02:50:34 EDT 2008


On Tue, 21 Oct 2008, Du Zhongdong wrote:

> Hi,
>
> I'm doing a NAND flash driver, and I suppose if ecc cannot be
> corrected while read something from NAND flash, that block should be
> marked bad, is that right?

No, not necessarily. A block should be marked bad if it cannot reliably 
hold data, i.e. if the block refuses to write or erase properly.

Normally, uncorrectable errors occur after there have been correctable 
errors for a while. When correctable errors start occurring, this is a 
sign that the block should be erased and rewritten. As someone pointed 
out, UBI does this, plain JFFS2 does not.

/Ricard
--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30
  --- PLEASE NOTE - I have moved - from F407 to F117 - PLEASE NOTE ---



More information about the linux-mtd mailing list