From: Valeriy Glushkov <gvv@lstec.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] nand: fixed failed reads on corrected ECC errors in nand_util.c
Date: Tue, 14 Jul 2009 13:51:10 +0300 [thread overview]
Message-ID: <124756867020-git-send-email-gvv@lstec.com> (raw)
In-Reply-To: A4EF277FA49042A0A7B6F9E13CF038FF@gvv
Signed-off-by: Valeriy Glushkov <gvv@lstec.com>
Signed-off-by: Paulraj, Sandeep <s-paulraj@ti.com>
---
drivers/mtd/nand/nand_util.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index fc16282..694ead6 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -567,10 +567,10 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
if (len_incl_bad == *length) {
rval = nand_read (nand, offset, length, buffer);
- if (rval != 0)
- printf ("NAND read from offset %llx failed %d\n",
- offset, rval);
-
+ if (!rval || rval == -EUCLEAN)
+ return 0;
+ printf ("NAND read from offset %llx failed %d\n",
+ offset, rval);
return rval;
}
@@ -591,7 +591,7 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
read_length = nand->erasesize - block_offset;
rval = nand_read (nand, offset, &read_length, p_buffer);
- if (rval != 0) {
+ if (rval && rval != -EUCLEAN) {
printf ("NAND read from offset %llx failed %d\n",
offset, rval);
*length -= left_to_read;
--
1.5.2.5
next prev reply other threads:[~2009-07-14 10:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 19:34 [U-Boot] Possible bug in NAND driver Paulraj, Sandeep
2009-07-14 9:03 ` Valeriy Glushkov
2009-07-14 10:51 ` Valeriy Glushkov [this message]
2009-07-16 19:50 ` [U-Boot] [PATCH] nand: fixed failed reads on corrected ECC errors in nand_util.c Scott Wood
2009-07-17 8:11 ` Valeriy Glushkov
2009-07-16 17:46 ` [U-Boot] Possible bug in NAND driver 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=124756867020-git-send-email-gvv@lstec.com \
--to=gvv@lstec.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