public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] skipping bad blocks when erasing nand
Date: Tue, 22 Aug 2006 11:44:34 +0200	[thread overview]
Message-ID: <20060822094434.GA7045@orphique> (raw)
In-Reply-To: <20060714111923.6FA41352B36@atlas.denx.de>

Dear Wolfgang,

On Fri, Jul 14, 2006 at 01:19:23PM +0200, Wolfgang Denk wrote:
> In message <44B76ABA.3000607@fsforth.de> you wrote:
> > 
> > / # mtd_debug erase /dev/mtd/2 0x22f00000 0x3000000
> > nand_erase: attempt to erase a bad block at page 0x0004bf40
> > MEMERASE: Input/output error
> 
> That's the behaviour I would expect to see from looking at the code.
> 
> And what you will see in U-Boot, too - same code, same behaviour.

Indeed, but MTD code in U-Boot is invoked different way (that's my bad
and I apologize for late reply). Most Linux users are probably using
mtd-utils to deal with erasing NAND. flash_erase will issue MEMERASE
ioctl directly and that will fail on attempt to erase bad block. However
flash_eraseall will first ask for bad block using MEMGETBADBLOCK ioctl
and eventually skip it, printing info message "Skipping bad block at 0x%08x"
Average U-Boot user probably wants flash_eraseall behaviour...

> > I think, bad blocks should not prevent U-Boot from erasing a partition,
> > which is needed to write an OS there, which needs to be booted.
> 
> I tend to agree here, which was the reason that I said I was  willing
> to  accept  the patch, but that at least the printf() shoould be kept
> so that the user gets the warning.

So, it seems the only unanswered question is implementation. You can
either accept second version of proposed patch or ask for different
implementation which will be similar to flash_eraseall (ie. bad block
checking done outside MTD code, so it can remain unmodified). Not being
U-Boot maintainer I trade off decision :-)

Best regards,
	ladis

  reply	other threads:[~2006-08-22  9:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13 22:21 [U-Boot-Users] skipping bad blocks when erasing nand David Byron
2006-07-13 22:45 ` Wolfgang Denk
2006-07-13 23:13   ` Dave Hylands
2006-07-14  7:10     ` Joachim Jaeger
2006-07-14  7:14   ` Stefan Roese
2006-07-14  8:28     ` Wolfgang Denk
2006-07-14  8:47       ` Stefan Roese
2006-07-14  9:29         ` Wolfgang Denk
2006-07-14  9:58         ` Joachim Jaeger
2006-07-14 11:19           ` Wolfgang Denk
2006-08-22  9:44             ` Ladislav Michl [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-17 21:42 David Byron
2006-07-20 23:22 ` Tolunay Orkun
2006-07-21  4:27   ` Stefan Roese
2006-07-13 21:35 David Byron
2006-07-13 21:48 ` Wolfgang Denk

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=20060822094434.GA7045@orphique \
    --to=ladis@linux-mips.org \
    --cc=u-boot@lists.denx.de \
    /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