* nand oob corruption recovery
@ 2004-07-01 17:24 David Updegraff
2004-07-01 19:00 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: David Updegraff @ 2004-07-01 17:24 UTC (permalink / raw)
To: linux-mtd
I realize that specs say that if you wipe out mfg. bad block markers
that there is "no way to recover them".. but...
Are there suggestions for plausibly reliable test sequences that one
could run a nand chip thru to regenerate valid bad block markers?
Presumeably, it is insufficient to simply try to erase all blocks,
marking failures as bad... perhaps verified full page writes ?
Suggestions?
Thanks.
-dbu / Dave Updegraff / dave@cray.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nand oob corruption recovery
2004-07-01 17:24 nand oob corruption recovery David Updegraff
@ 2004-07-01 19:00 ` Thomas Gleixner
2004-07-01 22:45 ` David Updegraff
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2004-07-01 19:00 UTC (permalink / raw)
To: linux-mtd
On Thursday 01 July 2004 19:24, David Updegraff wrote:
> I realize that specs say that if you wipe out mfg. bad block markers
> that there is "no way to recover them".. but...
> Are there suggestions for plausibly reliable test sequences that one
> could run a nand chip thru to regenerate valid bad block markers?
>
> Presumeably, it is insufficient to simply try to erase all blocks,
> marking failures as bad... perhaps verified full page writes ?
Erasing may be not sufficient, as the block could be al ff. Writing all blocks
to all zeros and verify that it works. Maybe try a 0x55 and 0xAA pattern too.
--
Thomas
_____________________________________________________________________
From slash dot org
"When customers are visiting, engineers are not allowed to wear ties.
That way the customer can tell who is the engineer and who is the
salesman (and therefore whom to believe.). Ties cut off blood flow
to the brain, making it easier for the salesmen to do their jobs."
_____________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nand oob corruption recovery
2004-07-01 19:00 ` Thomas Gleixner
@ 2004-07-01 22:45 ` David Updegraff
0 siblings, 0 replies; 3+ messages in thread
From: David Updegraff @ 2004-07-01 22:45 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
Relevant to this; enclosed is small nandwrite.c patch that fixes
segfault and at least warns about upcomming OOB destruction in
large-block devices.
-dbu.
[-- Attachment #2: nandwrite.patch --]
[-- Type: text/x-patch, Size: 974 bytes --]
--- mtd/util/nandwrite.c.orig 2004-07-01 17:09:12.124117544 -0500
+++ mtd/util/nandwrite.c 2004-07-01 17:16:44.497346360 -0500
@@ -42,8 +42,8 @@
/*
* Buffer array used for writing data
*/
-unsigned char writebuf[512];
-unsigned char oobbuf[16];
+unsigned char *writebuf;
+unsigned char *oobbuf;
// oob layouts to pass into the kernel as default
struct nand_oobinfo none_oobinfo = {
@@ -223,6 +223,19 @@
close(fd);
exit(1);
}
+
+ /* NOW! allocate writebuf and oobbuf.. */
+ writebuf = malloc (meminfo.oobblock);
+ oobbuf = malloc (meminfo.oobsize);
+ if (!writebuf || !oobbuf)
+ perror ("cannot allocate buffers\n");
+ if ((forcejffs2 || forceyaffs || autoplace) && (meminfo.oobsize > 16))
+ {
+ fprintf (stderr, "\nDanger!Danger! Will Robinson, Overriding driver's AUTO_ECC layout for \nlarge-block chips will almost certainly trash OOB!\n Continue? (y/N)\n");
+ if (getchar () != 'y') {
+ exit(1);
+ }
+ }
// write without ecc ?
if (noecc) {
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-01 22:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-01 17:24 nand oob corruption recovery David Updegraff
2004-07-01 19:00 ` Thomas Gleixner
2004-07-01 22:45 ` David Updegraff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox