linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: leiwen@marvell.com (Lei Wen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] MTD: pxa3xx_nand: Fix blank page ECC mismatch
Date: Tue,  7 Jun 2011 03:01:07 -0700	[thread overview]
Message-ID: <1307440867-18993-2-git-send-email-leiwen@marvell.com> (raw)
In-Reply-To: <1307440867-18993-1-git-send-email-leiwen@marvell.com>

From: Daniel Mack <zonque@gmail.com>

This bug was introduced in f8155a40 ("mtd: pxa3xx_nand: rework irq
logic") and causes the PXA3xx NAND controller fail to operate with NAND
flash that has empty pages. According to the comment in this block, the
hardware controller will report a double-bit error for empty pages,
which can and must be ignored.

This patch restores the original behaviour of the driver.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Lei Wen <leiwen@marvell.com>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable at kernel.org
---
 drivers/mtd/nand/pxa3xx_nand.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index faa0edd..30689cc 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -685,6 +685,8 @@ static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd,
 		 * OOB, ignore such double bit errors
 		 */
 		if (is_buf_blank(buf, mtd->writesize))
+			info->retcode = ERR_NONE;
+		else
 			mtd->ecc_stats.failed++;
 	}
 
-- 
1.7.0.4

  reply	other threads:[~2011-06-07 10:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 10:01 [PATCH 1/2] MTD: pxa3xx_nand: fix nand detection issue Lei Wen
2011-06-07 10:01 ` Lei Wen [this message]
2011-06-07 11:17   ` [PATCH 2/2] MTD: pxa3xx_nand: Fix blank page ECC mismatch Artem Bityutskiy
2011-06-07 12:28     ` Lei Wen
2011-06-25 11:48       ` Daniel Mack
2011-07-21 18:55         ` Brian Norris
2011-07-22  8:35           ` Artem Bityutskiy
2011-07-22  9:37             ` Artem Bityutskiy
2011-06-07 11:16 ` [PATCH 1/2] MTD: pxa3xx_nand: fix nand detection issue Artem Bityutskiy
2011-06-07 12:27   ` Lei Wen
2011-06-07 12:33 ` Artem Bityutskiy

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=1307440867-18993-2-git-send-email-leiwen@marvell.com \
    --to=leiwen@marvell.com \
    --cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).