From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] OMAP3 NAND ECC bug report
Date: Wed, 26 Oct 2011 15:26:55 -0500 [thread overview]
Message-ID: <4EA86D0F.1040307@freescale.com> (raw)
In-Reply-To: <CAACX+R3JTdaQaeP2zUM-29ORVePYbzfEoisDovBmnhx4vEvDkg@mail.gmail.com>
On 10/25/2011 02:41 AM, Arno Steffen wrote:
> I am feeling to spam the board but found finally the reason for this behaviour.
>
> nand_read returns with -EUCLEAN in case of correcting errors, and this
> will later on reported as BAD NAND, although this error is corrected.
>
> Correct me if I am wrong. What I did is chaning env_nand.c:
> while (amount_loaded < CONFIG_ENV_SIZE && offset < end) {
> if (nand_block_isbad(&nand_info[0], offset)) {
> offset += blocksize;
> } else {
> char_ptr = &buf[amount_loaded];
> - if (nand_read(&nand_info[0], offset, &len, char_ptr)) {
> - return 1;
> + err = nand_read(&nand_info[0], offset, &len, char_ptr);
> + if (err) {
> + if (err != -EUCLEAN) { // Bad NAND has been corrected, so no problem
> + return 1;
> + }
> }
> offset += blocksize;
> amount_loaded += len;
> }
>
>
> Correct me if I am wrong, but it seems that all platform are suffered,
> not just OMAP.
> There will be compared a corrected bits before and after correction,
> and it send an error message, if bits are corrected (instead of only
> if it can not be corrected).
What version of U-Boot are you looking at?
In readenv(), I see nand_read_skip_bad(), not nand_read().
nand_read_skip_bad() handles -EUCLEAN.
-Scott
next prev parent reply other threads:[~2011-10-26 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 9:06 [U-Boot] OMAP3 NAND ECC bug report Arno Steffen
2011-10-21 9:28 ` Arno Steffen
2011-10-25 7:41 ` Arno Steffen
2011-10-26 20:26 ` Scott Wood [this message]
2011-10-28 6:10 ` Arno Steffen
2011-10-28 16:06 ` Scott Wood
2011-10-31 9:36 ` Arno Steffen
2011-10-27 15:22 ` Ivan Nardi
2011-10-27 19:02 ` Scott Wood
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=4EA86D0F.1040307@freescale.com \
--to=scottwood@freescale.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