Erasing NAND bad blocks?
Steven Hein
ssh at sgi.com
Tue Aug 9 12:41:33 EDT 2005
(Yes, I do know that erasing NAND flash blocks that are marked bad
is a VERY BAD IDEA.....I'm asking the question regarding a
specific HW/SW debug situation.......)
In the course of bringing up new hardware with NAND flash attached
I have had occasions where a software bug will cause a NAND-based
filesystem (such as YAFFS) to mark *all* of the blocks in a filesystem
as bad. In the past, I have hacked the nand_erase() function to
allow erasing of bad blocks, then wrote a custom app to scan the OOB
data, doing a MEM_ERASE for blocks that had been marked bad by the FS.
Just wondering.....has anyone else
run into this situation, and is there a more graceful way of doing
this (i.e. without hacking the MTD NAND driver)?
Thanks!
Steve
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Hein (ssh at sgi.com) Engineering Diagnostics/Software
Silicon Graphics, Inc.
1168 Industrial Blvd. Phone: (715) 726-8410
Chippewa Falls, WI 54729 Fax: (715) 726-6715
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the linux-mtd
mailing list