nand_write_ecc() broken?

Charles Manning manningc2 at actrix.gen.nz
Sun Nov 23 14:31:08 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



More information about the linux-mtd mailing list