* Restore the bad block flag in OOB of NAND flash
@ 2003-04-17 17:21 Paul
2003-04-17 19:14 ` Thomas Gleixner
2003-04-17 20:49 ` Charles Manning
0 siblings, 2 replies; 5+ messages in thread
From: Paul @ 2003-04-17 17:21 UTC (permalink / raw)
To: linux-mtd
Dear All,
How can I restore the 0xFF in the OOB[5]? i understood the oob[5] is
the bad block indicator. The YAFFS set accidentally the byte to 0x00 . I
want to use JFFS2 but the eraseall command said they are invalid block. I
am
sure that the block is health . So, I want to force set the oob[5] to oxFF,
pls. how can i do? Thank you.
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Restore the bad block flag in OOB of NAND flash
2003-04-17 17:21 Restore the bad block flag in OOB of NAND flash Paul
@ 2003-04-17 19:14 ` Thomas Gleixner
2003-04-17 20:49 ` Charles Manning
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2003-04-17 19:14 UTC (permalink / raw)
To: Paul, linux-mtd
On Thursday 17 April 2003 19:21, Paul wrote:
> Dear All,
>
> How can I restore the 0xFF in the OOB[5]? i understood the oob[5] is
> the bad block indicator. The YAFFS set accidentally the byte to 0x00 . I
> want to use JFFS2 but the eraseall command said they are invalid block. I
> am
> sure that the block is health . So, I want to force set the oob[5] to
> oxFF, pls. how can i do? Thank you.
There is no "legal" way to do so. The only way is to erase it. The sanity
check is in erase function drivers/mtd/nand/nand.c.
But think about, if it's worth do so for 16KiB flash memory :)
--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Restore the bad block flag in OOB of NAND flash
2003-04-17 17:21 Restore the bad block flag in OOB of NAND flash Paul
2003-04-17 19:14 ` Thomas Gleixner
@ 2003-04-17 20:49 ` Charles Manning
2003-04-17 22:20 ` Thomas Gleixner
2003-04-18 3:44 ` Paul Wong
1 sibling, 2 replies; 5+ messages in thread
From: Charles Manning @ 2003-04-17 20:49 UTC (permalink / raw)
To: Paul, linux-mtd, yaffs list
On Friday 18 April 2003 05:21, Paul wrote:
> Dear All,
>
> How can I restore the 0xFF in the OOB[5]? i understood the oob[5] is
> the bad block indicator. The YAFFS set accidentally the byte to 0x00 . I
> want to use JFFS2 but the eraseall command said they are invalid block. I
> am
> sure that the block is health . So, I want to force set the oob[5] to
> oxFF, pls. how can i do? Thank you.
>
> Paul
Generally this is a bad idea to erase bad blocks since destroying factory
marked bad blocks can cause problems through the entire chip (not just the
bad block). eg. Some blocks are marked because a write to the block could
disturb data in another block.
More recent chips seem to have some hardware "fuse" blown to prevent bad
blocks from being erased.
One way to achieve what you want is to hack mkyaffs. mkyaffs erases the
blocks in the partition, but first checks for bad block markers. If you
comment out the check then it will erase the block regardless. This will set
all the bits in the block to 1 (including the bad block marker).
BTW: I am curious as to how YAFFS managed to mark your block bad.
-- Charles
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Restore the bad block flag in OOB of NAND flash
2003-04-17 20:49 ` Charles Manning
@ 2003-04-17 22:20 ` Thomas Gleixner
2003-04-18 3:44 ` Paul Wong
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2003-04-17 22:20 UTC (permalink / raw)
To: manningc2, Paul, linux-mtd, yaffs list
On Thursday 17 April 2003 22:49, Charles Manning wrote:
>
> One way to achieve what you want is to hack mkyaffs. mkyaffs erases the
> blocks in the partition, but first checks for bad block markers. If you
> comment out the check then it will erase the block regardless. This will
> set all the bits in the block to 1 (including the bad block marker).
Only if you hack drivers/mtd/nand/nand.c too, as there is a senity check,
which refuses to erase bad blocks :)
--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Restore the bad block flag in OOB of NAND flash
2003-04-17 20:49 ` Charles Manning
2003-04-17 22:20 ` Thomas Gleixner
@ 2003-04-18 3:44 ` Paul Wong
1 sibling, 0 replies; 5+ messages in thread
From: Paul Wong @ 2003-04-18 3:44 UTC (permalink / raw)
To: manningc2, linux-mtd, yaffs list
Thanks for suggestion. I will try it.
I am using the Samsung 16MB NAND flash . and separate 3 partitions.
/dev/mtd0 is used for kernel img; /dev/mtd1 for general file drive (YAFFS);
/dev/mtd2 for initrd.img. The yaffs driver is compiled by module. and set
"mount -t yaffs /dev/block1 /mnt/flash" in rcS (setup script). No format the
partition in the first mounting.
The drive is not always to use, it is just saved the config. file. So, I
dont clearly know why the yaffs is corrupt. I check the disk space by "du"
command. It said 100% used . And cannot remove any file in this /mnt/flash.
therefore , i think it is corrupted.
Any ideal??
Thank a lot.
Paul
----- Original Message -----
From: "Charles Manning" <manningc2@actrix.gen.nz>
To: "Paul" <paul@maypaul.com>; <linux-mtd@lists.infradead.org>; "yaffs list"
<yaffs@toby-churchill.org>
Sent: Friday, April 18, 2003 4:49 AM
Subject: Re: Restore the bad block flag in OOB of NAND flash
> On Friday 18 April 2003 05:21, Paul wrote:
> > Dear All,
> >
> > How can I restore the 0xFF in the OOB[5]? i understood the oob[5]
is
> > the bad block indicator. The YAFFS set accidentally the byte to 0x00 .
I
> > want to use JFFS2 but the eraseall command said they are invalid block.
I
> > am
> > sure that the block is health . So, I want to force set the oob[5] to
> > oxFF, pls. how can i do? Thank you.
> >
> > Paul
>
> Generally this is a bad idea to erase bad blocks since destroying factory
> marked bad blocks can cause problems through the entire chip (not just the
> bad block). eg. Some blocks are marked because a write to the block could
> disturb data in another block.
>
> More recent chips seem to have some hardware "fuse" blown to prevent bad
> blocks from being erased.
>
> One way to achieve what you want is to hack mkyaffs. mkyaffs erases the
> blocks in the partition, but first checks for bad block markers. If you
> comment out the check then it will erase the block regardless. This will
set
> all the bits in the block to 1 (including the bad block marker).
>
> BTW: I am curious as to how YAFFS managed to mark your block bad.
>
> -- Charles
>
>
>
> --------------------------------------------------------------------------
-------------
> This mailing list is hosted by Toby Churchill open software
(www.toby-churchill.org).
> If mailing list membership is no longer wanted you can remove yourself
from the list by
> sending an email to yaffs-request@toby-churchill.org with the text
"unsubscribe"
> (without the quotes) as the subject.
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-04-18 3:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-17 17:21 Restore the bad block flag in OOB of NAND flash Paul
2003-04-17 19:14 ` Thomas Gleixner
2003-04-17 20:49 ` Charles Manning
2003-04-17 22:20 ` Thomas Gleixner
2003-04-18 3:44 ` Paul Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox