From: Michele De Candia (VT) <michele.decandia@valueteam.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] PATCH: bugfix for nand erase failure with bad blocks
Date: Wed, 17 Jun 2009 09:18:13 +0200 [thread overview]
Message-ID: <4A3898B5.8060309@valueteam.com> (raw)
In-Reply-To: <4A37FE47.3030203@freescale.com>
Scott Wood wrote:
> Wolfgang Denk wrote:
>> Dear "Michele De Candia (VT)",
>>
>> In message <4A37F7BF.2090101@valueteam.com> you wrote:
>>>>> this patch fixes a bug for 'nand erase' command: when bad blocks
>>>>> are present into erasing area, they were skipped but the erased
>>>>> size was updated anyway.
>>>> And what exactly is the bug in this behaviour?
>>>>
>>> I think that 'erase' should have the same behaviour of 'write' and
>>> 'read' commands: skip bad blocks until read/write size is reached.
>>> If you write a script that erases and then writes a NAND area and
>>> bad blocks are not skipped while erasing (as U-Boot actually does),
>>> the following 'write' is successfully done but ECC checks fail on
>>> next read on the same area.
>>
>> I see - thanks for the explanation.
>>
>> Hm... actually I think the write should fail in such a case...
>>
>> Scott, what do you think?
>
> I think the current behavior is reasonable. You're erasing a specific
> region of flash, not an amount needed to hold a certain amount of data.
>
From this point of view you're in the right; maybe this would be
explained in 'README.nand' documentation or what do you think about add
ing an option to 'nand erase' command to consider 'size' field as the
effective blocks size to be erased and not as the area size?
> While I can see the appeal of Michele's suggestion, I think it would
> be more error-prone as people trying to erase a region rather than
> just the size of data could erase too much.
>
> It definitely should not be an error to erase a region that happens to
> contain a bad block. Bad blocks are expected and we need to work
> around them.
>
> -Scott
--
*Michele Jr **De Candia*
------------------------------------------------------------------------
Value Team
Via Vespri Siciliani, 9
20146 Milano
Tel. +39 0248985722
michele.decandia at valueteam.com <mailto:michele.decandia@valueteam.com>
http://www.valueteam.com
CONFIDENTIALITY NOTICE -This message and its attachments (if any) may
contain confidential, proprietary or legally privileged information and
is intended only for the use of the addressee named above. No
confidentiality or privilege is waived or lost by any mistransmission.
If you are not the intended recipient of this message you are hereby
notified that you must not use, disseminate, copy it in any form or take
any action in reliance on it. If you have received this message in error
please delete it and any copies of it and kindly inform the sender of
this e-mail by replying or go to www.valueteam.com
<http://www.valueteam.com> on 'contacts'.
next prev parent reply other threads:[~2009-06-17 7:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 13:06 [U-Boot] PATCH: bugfix for nand erase failure with bad blocks Michele De Candia
2009-06-16 18:10 ` Wolfgang Denk
2009-06-16 19:51 ` Michele De Candia
2009-06-16 20:09 ` Wolfgang Denk
2009-06-16 20:19 ` Scott Wood
2009-06-17 7:18 ` Michele De Candia [this message]
2009-06-17 7:43 ` Michele De Candia
2009-06-17 7:44 ` Michele De Candia
2009-06-17 15:54 ` Scott Wood
2009-06-17 16:17 ` Michele De Candia
2009-06-17 22:04 ` Scott Wood
2009-06-17 22:15 ` Wolfgang Denk
2009-06-17 22:34 ` Scott Wood
2009-06-19 7:01 ` Michele De Candia
2009-06-17 22:11 ` Wolfgang Denk
2009-06-17 9:18 ` 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=4A3898B5.8060309@valueteam.com \
--to=michele.decandia@valueteam.com \
--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