Bad Blocks On JFFS2/NAND

Thomas Gleixner tglx at linutronix.de
Tue Oct 19 11:02:28 EDT 2004


On Tue, 2004-10-19 at 16:39, Simon Haynes wrote:
> Thomas,
> 
> I am using the ready pin.

Hmm, the strange thing is, that it does not complain about a failed
erase. It complaines, when checking if the chip is really erased.

Can you try the hack below, which invalidates the page cache
unconditionally on erase ?

tglx

RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.121
diff -u -r1.121 nand_base.c
--- nand_base.c 6 Oct 2004 19:53:11 -0000       1.121
+++ nand_base.c 19 Oct 2004 15:09:35 -0000
@@ -2091,8 +2091,7 @@

                /* Invalidate the page cache, if we erase the block
which contains
                   the current cached page */
-               if (page <= this->pagebuf && this->pagebuf < (page +
pages_per_block))
-                       this->pagebuf = -1;
+               this->pagebuf = -1;

                this->erase_cmd (mtd, page & this->pagemask);







More information about the linux-mtd mailing list