NAND Configuration

Thomas Gleixner tglx at linutronix.de
Thu Aug 8 04:59:23 EDT 2002


On Wed, 2002-08-07 at 23:11, Alice Hennessy wrote:
> > Have you ever erased your flash with erase /dev/mtdX ?
> > This may have caused the problem, because erase is not aware of bad
> > block handling and may have erased a block, which was marked as bad
> > already and erased the bad block marker too. So if you write to this
> > block, you get a write failure and therefor a read failure afterwards.
> > I will change nand.c, so that bad blocks cannot be erased anymore.
> >
> 
> >From looking at nand_erase(), it appears that the attempted erase of a bad
> block would
> result in not performing the erase and exiting with -EIO, correct?
> 
> What is the preferred method to erase nand?
> 
> Alice

With actual code in CVS you can use erase(all) /dev/mtdX. I modified it,
that attempts to erase bad block's are rejeceted in any case. The
previous version let you erase bad blocks, if CONFIG_NAND_ECC_JFFS2 was
not set. But now it's forced by default.

-- 
Thomas 
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de





More information about the linux-mtd mailing list