nand_write_ecc() broken?

David Woodhouse dwmw2 at infradead.org
Wed Dec 3 05:15:28 EST 2003


On Tue, 2003-12-02 at 16:54 -0500, joshua at dashnine.joshuawise.com wrote:
> >   If bad block managemnet is not really an mtd responsibility then why
> > does nand_erase() inside mtd/nand/nand.c call
> > this->block_bad(mtd, page) which checks for bad blocks?
> It is in the specification for most chips that you must not erase bad
> blocks, as you'll wipe out the bad block data and generally cause Bad
> Stuff to happen.

Also, sometimes the precise way in which bad blocks are marked is very
hardware-specific. On the DiskOnChip, for example, we mark bad blocks as
such in a separate Bad Block Table, then erase the good blocks and reuse
the byte in the spare area which was used by the manufacturer for the
good/bad mark. 

I prefer to let the low-level driver keep track of bad blocks and refuse
to allow erase/write on them. 

-- 
dwmw2




More information about the linux-mtd mailing list