From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Michael D. Burkey" <mdburkey@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: imx6: Nand flash BB erase issue/question...
Date: Fri, 19 Dec 2014 07:27:56 +0100 [thread overview]
Message-ID: <20141219062756.GW30369@pengutronix.de> (raw)
In-Reply-To: <CAO6XYUuZuSt7dNUq_EH_nc8_E9-o=fMu702sJSQcvBn4O83Fdg@mail.gmail.com>
On Wed, Dec 17, 2014 at 03:05:58PM -0500, Michael D. Burkey wrote:
> I have run into an issue that I wonder if anyone else has seen.
>
> We have our kernel stored in NAND flash and have it partition and have
> the nand0.kernel and nand0.kernel.bb entries.
>
> As I understand it, the nand0.kernel.bb entry is the correct one to
> use for day to day operations as it handles bad blocks.
>
> The issue comes when I try erasing the kernel prior to updating it on
> a SOM with a known bad block inside the kernel area.
>
> Doing an erase of nand0.kernel works fine and skips the bad block.
>
> Doing an erase of nand0.kernel.bb however generates an error message:
>
> nand: nand_erase_nand: attempt to erase a bad block at page
> 0x00000bc0
>
> It then exits with an "erase: I/O error".
>
> Specifically, it looks like an attempt to erase a .bb device calls
> nand_erase_nand() (in nand_base.c) which then uses
> nand_block_checkbad() to determine if the block is bad and then just
> generates an error exit rather than attempting to skip the bad block.
>
> To me, this seems wrong.
>
> Shouldn't an attempt to erase a .bb NAND device actually HANDLE the
> bad blocks by skipping them rather than simply erroring out?
You are absolutely right. This must be a bug.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2014-12-19 6:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 20:05 Michael D. Burkey
2014-12-19 6:27 ` Sascha Hauer [this message]
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=20141219062756.GW30369@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=mdburkey@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox