NAND OOB Questions...

Thomas Gleixner tglx at linutronix.de
Tue Jun 6 01:38:49 EDT 2006


On Mon, 2006-06-05 at 08:17 -0700, Steve Finney wrote:
> >From: Thomas Gleixner <tglx at linutronix.de>
> >The buffer is usually 0xff except when a caller provides content.
> 
> I'm not going to repeat all the previous content, but from what you've said,
> it confirms that there is a bug in the current nand_base.c code under the following particular
> set of circumstances:
> 
> 1) A NAND flash that allows more than one cycle of writing between erases (at
>   least in the OOB area). (e.g., the Samsung K9F* chip).
> 2) Using hardware ECC (e.g., the Samsung S3C2410 processor).
> 3) A sequence in which you initially write to the device with ECC, and then
>   turn off ECC and do additional writes including the OOB area.
> 
> In the above sequence, the ECC the user writes to the OOB may get corrupted.

Yeah. I did not think about that abstruse scenario :) What the hell is
this for ?

> I  have an (ugly) user-level workaround: before I turn off the ECC, I write a 
> block that I know will generate ECC bytes consisting of 0xFF. Then the subsequent
> user ECC writes are OK.
> 
> It's obscure enough that it's probably not worth fixing (well, I'm not going to try to
> fix it :-) ),  and hopefully it's fixed in the refactoring. 

Should be.

	tglx






More information about the linux-mtd mailing list