nand_write_ecc() broken?

Rick Bronson rick at efn.org
Tue Dec 2 15:36:44 EST 2003


> On Monday 24 November 2003 04:47, Rick Bronson wrote:
> > Hi,
> >
> >   The routine nand_write_ecc() doesn't seem to account for bad blocks.
> > If I write an image over a known bad block, nand_erase() correctly
> > identifies and skips over the bad block (via nand_block_bad()) but
> > nand_write_ecc() seems to ignore the bad blocks.
> >
> >   Anyone experienced the same problem?
> >
> > I'm using 11/16/03 cvs version of mtd on an ARM, linux-2.4.19, and
> > here's my config:
> >
> > CONFIG_JFFS2_FS=y
> > CONFIG_JFFS2_FS_DEBUG=0
> > CONFIG_JFFS2_FS_NAND=y
> >
> >  Here's my hardware specific NAND stuff:
> >
> > 	my_nand->eccmode = NAND_ECC_SOFT;  /* enable ECC */
> > 	my_nand->chip_delay = 20;
> >
> 
> Writing to known bad blocks is not necessarily a problem, depending on how 
> the block became bad (eg. bad block marking). Bad block managemnet is not 
> really an mtd responsibility, but that of the file system/block device driver.
> 
> -- CHarles


Dear Charles,

  Thanks much for the response.

  I presume that the bad block in question was marked by the manufacturer.

  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?

  Do you know where in the jffs2 filesystem code it checks for bad
blocks?

  Really appreciate the help.

  Rick Bronson





More information about the linux-mtd mailing list