public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Kyungmin Park <kyungmin.park@samsung.com>
To: Adrian Hunter <hunter.programmer@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: onenand_wait and onenane_read
Date: Fri, 05 Jan 2007 07:18:46 +0000 (GMT)	[thread overview]
Message-ID: <23075422.90991167981526516.JavaMail.weblogic@ep_ml22> (raw)

Hi,

> Note that after the patch, onenane_wait seems to return non-zero even
> when the error is corrected by ecc.  Shouldn't it return zero in that
> case?

After ecc patch, I think is it really need to return error code when 1 bit ecc.
Even though there's 1-bit ecc the bufferram has valid data. since ecc logic already corrects it.

I think we don't need to return ecc error when 1-bit ecc. We only return error code when 2-bit ecc error

@@ -327,12 +327,12 @@ static int onenand_wait(struct mtd_info *mtd, int state)
                int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
                if (ecc) {
                        DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: ECC error = 0x%04x\n", ecc);
-                       if (ecc & ONENAND_ECC_2BIT_ALL)
+                       if (ecc & ONENAND_ECC_2BIT_ALL) {
                                mtd->ecc_stats.failed++;
-                       else if (ecc & ONENAND_ECC_1BIT_ALL)
+                               return ecc;
+                       } else if (ecc & ONENAND_ECC_1BIT_ALL)
                                mtd->ecc_stats.corrected++;
                }
-               return ecc;
        }

        return 0;

Thank you,
Kyungmin Park


             reply	other threads:[~2007-01-05  7:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05  7:18 Kyungmin Park [this message]
     [not found] <31382027.865581167361152877.JavaMail.weblogic@ep_ml28>
2007-01-02  8:05 ` onenand_wait and onenane_read Adrian Hunter
  -- strict thread matches above, loose matches on Subject: below --
2006-12-29  3:19 Kyungmin Park
2006-12-28  9:27 Adrian Hunter

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=23075422.90991167981526516.JavaMail.weblogic@ep_ml22 \
    --to=kyungmin.park@samsung.com \
    --cc=hunter.programmer@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /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