linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* mtd nand erase and bad block
@ 2012-05-31 12:12 Matteo Facchinetti
  2012-05-31 13:28 ` Adrian Hunter
  0 siblings, 1 reply; 25+ messages in thread
From: Matteo Facchinetti @ 2012-05-31 12:12 UTC (permalink / raw)
  To: linux-mtd

Hi,

I'm developing a mtd driver for a nand flash controller and I need help;
I'm to the end of the work, and I have problems and dubts about bad 
block handling.

For test, I mark manually bad block byte on flash block.
When I erase with flash_erase, all works and skip the bad block:
:~# flash_erase /dev/mtd6 0 0
Erasing 1024 Kibyte @ 100000 --  2 % complete flash_erase: Skipping bad 
block at 00200000
Erasing 1024 Kibyte @ 2700000 -- 100 % complete

If I try to erase with -N parameter I read the following output:
~# flash_erase -N /dev/mtd6 0 0 

Erasing 1024 Kibnand_erase_nand: attempt to erase a bad block at page 
0x00001600
yte @ 200000 --  5 % complete libmtd: error!: MEMERASE64 ioctl failed 
for eraseblock 2 (mtd6)
         error 5 (Input/output error)
flash_erase: error!: /dev/mtd6: MTD Erase failure
              error 5 (Input/output error)
Erasing 1024 Kibyte @ 2700000 -- 100 % complete

I espected that with -N option, flash_erase should erase the 
hand-damaged block, recovering the usability of the block. Is it true?

What's going wrong?

Best Regards,
Matteo

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2012-07-16 14:42 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 12:12 mtd nand erase and bad block Matteo Facchinetti
2012-05-31 13:28 ` Adrian Hunter
2012-05-31 14:28   ` Matteo Facchinetti
2012-05-31 19:57     ` Shmulik Ladkani
2012-06-01  6:24     ` Adrian Hunter
2012-06-01  6:37       ` Ricard Wanderlof
2012-06-01  8:29         ` Angus CLARK
2012-06-01  8:42           ` Artem Bityutskiy
2012-06-01 11:04             ` Shmulik Ladkani
2012-06-01 14:03               ` Angus CLARK
2012-06-01 14:54                 ` Shmulik Ladkani
2012-06-01 15:28                   ` Angus CLARK
2012-06-05 12:17                   ` Artem Bityutskiy
2012-06-14 17:48                     ` Brian Norris
2012-06-14 21:31                       ` Shmulik Ladkani
2012-06-15  6:55                       ` Angus CLARK
2012-06-26 22:10                       ` Tomer Barletz
2012-06-18  9:34                     ` Angus CLARK
2012-06-27  9:54                       ` Artem Bityutskiy
2012-06-27 12:37                         ` Angus CLARK
2012-06-29 10:31                           ` Artem Bityutskiy
2012-07-02  7:14                             ` Angus CLARK
2012-07-03 12:22                               ` Artem Bityutskiy
2012-07-03 15:05                                 ` Angus CLARK
2012-07-16 14:37                                   ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).