[PATCH] mtd: nand: add option to erase NAND blocks even if detected as bad.

Richard Weinberger richard at nod.at
Fri May 12 01:33:27 PDT 2017

Boris, Mario,

Am 12.05.2017 um 10:24 schrieb Boris Brezillon:
>>> Hmm, this sounds like a gross hack.  
>> It is, but I see no other solution. The NAND chips were used in an
>> incompatible way by a hack-n-slash driver made by allwinner, and
>> trying to load them with a proper MTD driver fails miserably if this
>> is not done.
>> If anyone can propose a better solution I'll more than happily implement it.
>> I'm open to suggestions, and of course I'm open to rejection of my
>> patches if needed.
> u-boot provides the nand.scrub command, which does exactly what you're
> looking for. And no, I don't think it's a good idea to allow erasing
> bad blocks, at least not by default.

To make this very clear for all MTD users out there, scrubbing the NAND and
losing the information which blocks are bad is awful.
Bad blocks can work somehow and fail much later in funny ways.
UBI/FS problems ahead...

Do this only if you *really* know what you are doing.


More information about the linux-mtd mailing list