Single bit error correction on NAND.

Thomas Gleixner tglx at linutronix.de
Fri Jul 29 03:35:44 EDT 2005


On Thu, 2005-07-28 at 18:40 -0300, DataCom - Virgílio wrote:
> > 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
> 
> Maybe I'm missing something, but the function nand_do_read_ecc returns 
> -EBADMSG only if an uncorrectable error is detected by nand_correct_data. If 
> just one bit is flipped, nand_correct_data corrects it, and nand_do_read_ecc 
> returns 0.

Damn, you're right. I check into this.

tglx






More information about the linux-mtd mailing list