All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
	"[2.6.38+]"@mail.zonque.de, David.Woodhouse@intel.com,
	leiwen@marvell.com, s.neumann@raumfeld.com,
	Haojian Zhuang <haojian.zhuang@marvell.com>,
	Daniel Mack <zonque@gmail.com>,
	stable@kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] mtd: pxa3xx_nand: Fix blank page ECC mismatch
Date: Mon,  7 Nov 2011 16:43:31 +0100	[thread overview]
Message-ID: <1320680611-29448-5-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1320680611-29448-1-git-send-email-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@kernel.org [2.6.38+]
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 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 f08fae9..063cb19 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.6.4

WARNING: multiple messages have this Message-ID (diff)
From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] mtd: pxa3xx_nand: Fix blank page ECC mismatch
Date: Mon,  7 Nov 2011 16:43:31 +0100	[thread overview]
Message-ID: <1320680611-29448-5-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1320680611-29448-1-git-send-email-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 [2.6.38+]
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 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 f08fae9..063cb19 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.6.4

  parent reply	other threads:[~2011-11-07 15:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 15:43 [PATCH 0/4] Re-sending pxa3xx nand controller patches Daniel Mack
2011-11-07 15:43 ` Daniel Mack
2011-11-07 15:43 ` [PATCH 1/4] mtd: pxa3xx_nand: fix a memory leak Daniel Mack
2011-11-07 15:43   ` Daniel Mack
2011-11-07 15:43 ` [PATCH 2/4] mtd: pxa3xx_nand: remove unused variable 'mtd' Daniel Mack
2011-11-07 15:43   ` Daniel Mack
2011-11-07 15:43 ` [PATCH 3/4] mtd: pxa3xx_nand: fix nand detection issue Daniel Mack
2011-11-07 15:43   ` Daniel Mack
2011-11-07 15:43 ` Daniel Mack [this message]
2011-11-07 15:43   ` [PATCH 4/4] mtd: pxa3xx_nand: Fix blank page ECC mismatch Daniel Mack
2011-11-17 21:15 ` [PATCH 0/4] Re-sending pxa3xx nand controller patches Artem Bityutskiy
2011-11-17 21:15   ` 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=1320680611-29448-5-git-send-email-zonque@gmail.com \
    --to=zonque@gmail.com \
    --cc="[2.6.38+]"@mail.zonque.de \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=David.Woodhouse@intel.com \
    --cc=haojian.zhuang@marvell.com \
    --cc=leiwen@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=s.neumann@raumfeld.com \
    --cc=stable@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.