From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Richard Weinberger <richard@nod.at>
Cc: Mario Rugiero <mrugiero@gmail.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] mtd: nand: add option to erase NAND blocks even if detected as bad.
Date: Fri, 12 May 2017 10:44:04 +0200 [thread overview]
Message-ID: <20170512104404.6416cc11@bbrezillon> (raw)
In-Reply-To: <ecb9a289-cac4-d7b1-1897-ed52553407e3@nod.at>
On Fri, 12 May 2017 10:33:27 +0200
Richard Weinberger <richard@nod.at> wrote:
> 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.
I'm clearly not encouraging people to use nand.scrub, it's just that
sometime you don't have a choice, and this is the case here:
Allwinner is putting non-FF data in the BBM region, and when we switch
from an Allwinner kernel to a mainline kernel, the mainline kernel
considers all programmed blocks as bad.
next prev parent reply other threads:[~2017-05-12 8:44 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 5:39 [PATCH] mtd: nand: add option to erase NAND blocks even if detected as bad Mario J. Rugiero
2017-05-12 5:52 ` [PATCH v2] " Mario J. Rugiero
2017-05-12 7:39 ` [PATCH v3] " Mario J. Rugiero
2017-05-15 8:21 ` Boris Brezillon
2017-05-15 9:23 ` Richard Weinberger
2017-05-15 9:41 ` Boris Brezillon
2017-05-15 10:10 ` Richard Weinberger
2017-05-15 11:05 ` Boris Brezillon
2017-05-15 13:16 ` Mario Rugiero
2017-05-15 13:20 ` Boris Brezillon
2017-05-12 8:12 ` [PATCH] " Richard Weinberger
2017-05-12 8:16 ` Mario Rugiero
2017-05-12 8:24 ` Boris Brezillon
2017-05-12 8:33 ` Richard Weinberger
2017-05-12 8:44 ` Boris Brezillon [this message]
2017-05-12 8:45 ` Richard Weinberger
2017-05-12 8:34 ` Mario Rugiero
2017-05-12 8:45 ` Boris Brezillon
[not found] ` <CAKKQwLQueea6G4B-cng9QdpjtRWyBWHw1Mq9ai3DVp31xswANg@mail.gmail.com>
2017-05-12 9:02 ` Boris Brezillon
2017-05-12 9:15 ` Mario Rugiero
2017-05-12 9:16 ` Mario Rugiero
2017-05-12 9:32 ` Boris Brezillon
2017-05-12 9:19 ` Richard Weinberger
2017-05-12 9:26 ` Mario Rugiero
2017-05-12 9:34 ` Boris Brezillon
2017-05-12 10:06 ` Mario Rugiero
2017-05-12 10:19 ` Boris Brezillon
2017-05-12 10:23 ` Mario Rugiero
2017-05-12 10:34 ` Mario Rugiero
2017-05-13 9:17 ` Richard Weinberger
2017-05-15 2:54 ` Mario Rugiero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170512104404.6416cc11@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=linux-mtd@lists.infradead.org \
--cc=mrugiero@gmail.com \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.