Problem in erasing a nand flash with ubiformat

Artem Bityutskiy dedekind at infradead.org
Wed Jun 10 04:35:37 EDT 2009


On Wed, 2009-06-10 at 10:27 +0200, Canella Matteo wrote:
> Hi all,
> I have a question for Artem,
> I'm running a problem with ubiformat and I saw this email from you:
> 
> http://lists.infradead.org/pipermail/linux-mtd/2009-January/024285.htm
> 
> I'm having the same problem, ubiformat fails to format a nand flash because it is not able to erase a block.
> flash_eraseall just ignore this erase problem.

Sorry, I am not sure what you mean. You say that ubiformat gets an
erase error and instead of marking the eraseblock as bad it exits?

Are you using the newest ubiformat version from the mtd-utils git
tree?

The latest ubiformat does have code which makrs a block as bad on
write and erase errors. See the 'mark_bad()' function. If this
does not work for you, could you please try to use gdb and figure
out why? The code currently tries to mark the eraseblock as bad
only in case of an EIO errors, may be this is the problem?

> Do you think ubiformat should physically mark this block as bad eraseblock? Or should it just ignore it?
Yes it should. And there is already code in ubiformat which implements
this.

> Why currently ubiformat or flash_eraseall does not mark these as bad blocks?

It does. Make sure you use the latest ubiformat. Not sure about
flash_eraseall, I do not use it nowadays.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list