public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* NAND Flash bad blocks
@ 2008-07-08 12:57 Prakash N
  0 siblings, 0 replies; only message in thread
From: Prakash N @ 2008-07-08 12:57 UTC (permalink / raw)
  To: linux-mtd

Hi All

I am using 256MB NAND Flash. I have created 4 partitions of 64 MB each.
I have a program to mark a particular block as a bad block. 

I notice when I create a bad block within 22 blocks from the start of a
partition, though I am able to erase all the blocks properly skipping
all the bad blocks created, it is unable to copy the file system to the
partition, it gives I/O error as below. For example my partitions starts
from 0x0, 0x4000000,0x8000000 and 0xc000000 with block numbers at
0,512,1024 & 1536. The block size is 128 KB (0x20000). I get this error
if I create bad blocks any where from 2 to 22, 512 to 533, 1024 to 1045
& 1536 to 1557.

======
flash_eraseall /dev/mtd1
Erasing 128 Kibyte @ 0 --  0 % complete.
Skipping bad block at 0x00020000
Erasing 128 Kibyte @ 3a00000 -- 90 % complete.
Skipping bad block at 0x03a20000
Erasing 128 Kibyte @ 3fe0000 -- 99 % complete.
sh-3.00# flashcp /home/jffs2.img /dev/mtd1
nand_erase: attempt to erase a bad block at page 0x00008040
While erasing blocks from 0x00000000-0x002c0000 on /dev/mtd1:
Input/output error
======

If I create bad blocks in the range of 22 to 511, 534 to 1023, 1046 to
1535 and 1558 to 2047 I do not face any issue. It skips the bad blocks
properly and it can copy the file system to the partition.

I appreciate if any one give an explanation for the same. Is it not
possible to have bad blocks in the start of a partition? How the magic
number 22 blocks can be explained in this situation. I really appreciate
your help. 

Prakash

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-08 12:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08 12:57 NAND Flash bad blocks Prakash N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox