Thomas Gleixner wrote: > Hmm, can you verify that the chip is erased correctly, when you do an > flash_eraseall ? Dump it and check for nonzero pages. I used: # flash_eraseall /dev/mtd/4 # nanddump /dev/mtd/4 dump.out No, not all spages are erased after doing a flash_eraseall. i.e. they were not all 0xff. The very first 8MB Flash partition that I started using for development is missing about 60% of its space due to "bad eraseblocks". The second 8MB Flash partition is missing only 1%. Luckily I make my own Smartmedia cards, so I can simply solder in a new Flash chip for further development. From now on I think I will make my partitions much smaller so I don't "lose" as many. ;) y2 # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root 102901816 77308708 20365960 79% / tmpfs 15428 152 15276 1% /var /dev/mtdblock/4 16368 9904 6464 61% /mnt/y1 /dev/mtdblock/5 16368 176 16192 1% /mnt/y2 y2 # ll /mnt/y1 yaffs_readdir: starting at 0 yaffs_readdir: starting at 3 drw-rw-rw- 1 root root 512 Dec 6 11:12 ./ drwxrwxr-x 9 root 100 4096 Nov 11 10:17 ../ drw-rw-rw- 1 root root 512 Dec 6 11:12 lost+found/ y2 # ll /mnt/y2 yaffs_readdir: starting at 0 yaffs_readdir: starting at 3 drw-rw-rw- 1 root root 512 Dec 6 11:12 ./ drwxrwxr-x 9 root 100 4096 Nov 11 10:17 ../ drw-rw-rw- 1 root root 512 Dec 6 11:12 lost+found/ >>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? > Can I have a look at your board driver ? Sure, see attached. I simply modified the existing at91_nand.c file to compile with the latest MTD drivers. see http://lists.infradead.org/pipermail/linux-mtd/2004-December/011039.html for details on the changes I made to at91_nand.c regards, Aras Vaichas