MTD utils v1.5.0: MEMERASE64 ioctl failed error

Brian Norris computersforpeace at gmail.com
Fri Oct 11 15:24:59 PDT 2013


Hi Minal,

On Wed, Oct 09, 2013 at 05:05:11AM +0000, Shah, Minal wrote:
> I am using MTD utils version 1.5.0 for DRA7 (Vayu) platform.
> 
> I have bad blocks in some of my NAND partitions which I am not able to erase from linux kernel.

MTD does not allow erasing bad blocks. This is prohibited by NAND
datasheets. There are occasions where, for debugging purposes, one might
need to erase a "bad" block that is not actually bad, but MTD does not
provide an interface for doing this. An interface for doing so was
discussed a while back, but nothing was merged.

> Using "-N" option in flash_eraseall ideally should have allowed erasing the bad block but I land up in "MEMERASE64 ioctl failed" error. 

"-N" just means that the user-space tool (flash_erase) won't try to skip
bad blocks. But that doesn't circumvent the in-kernel protection that
prevents the erase from succeeding. So the "Input/output" error you see
is completely expected and currently unavoidable, unless you modify your
kernel to remove this protection.

[snip]

So why do you want to erase bad blocks?

Brian



More information about the linux-mtd mailing list