Eraseall will not try to erase blocks marked bad. Anyway, the mtd will also not allow this. If I understand the thread properly, you want to erase blocks that were marked bad by YAFFS but were not marked bad by manufacturing. Attempting to erase a factory marked bad block **might** destroy the flash and make is unusable. To do this, I suggest doing the following: * Modify eraseall to skip the check, as Thomas suggests. Instead of checking for bad blocks, check for some other pattern to distinguish between YAFFS-marked and factory-marked bad blocks. The actual patterns used by factories depends on the make, part number etc but most often the whole OOB area of a bad block will be zero. A YAFFS-marked bad block will be zero only in the bad-block byte and only then in the first two pages. * You will also need to bypass the check in mtd. -- Charles -----Original Message----- From: yaffs-admin@stoneboat.aleph1.co.uk [mailto:yaffs-admin@stoneboat.aleph1.co.uk] On Behalf Of Timofei V. Bondarenko Sent: Tuesday, 7 December 2004 2:20 a.m. To: Aras Vaichas Cc: yaffs@stoneboat.aleph1.co.uk Subject: Re: [Yaffs] cvs YAFFS + MTD cvs + 2.4.27-vrs1 problems Hi. Aras Vaichas wrote: > Thomas Gleixner wrote: >>>Surely it's not the easy to "break" a NAND chip? Can my original NAND >>>be recovered? >>> >> It's quite easy, if the timing is wrong or if the rdy/busy check is >> not reliable. > > Is there a utility that writes to every single page, reads back the > data and then marks the pages correctly? Or are those "bad > eraseblocks" permanently lost? > AFAIK, the eraseall can't erase blocks already marked bad. To do it i'm just comment out a 'goto' near "attempt to erase bad block" warning in drivers/mtd/nand/nand_base.c Not the best way, though there were no appropriate ioctl to do it else. You'll have to reboot after eraseall, since bad block list still reside in memory. Regards. Timofei. _______________________________________________ yaffs mailing list yaffs@stoneboat.aleph1.co.uk http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs