mtd: pxa3xx_nand: Fix blank page ECC mismatch

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 7 11:59:11 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=543e32d5ff165d0d68deedb0e3557478c7c36a4a
Commit:     543e32d5ff165d0d68deedb0e3557478c7c36a4a
Parent:     0fab028b77d714ad302404b23306cf7adb885223
Author:     Daniel Mack <zonque at gmail.com>
AuthorDate: Tue Jun 7 03:01:07 2011 -0700
Committer:  Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Sun Sep 11 15:02:05 2011 +0300

    mtd: pxa3xx_nand: Fix blank page ECC mismatch
    
    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 at gmail.com>
    Acked-by: Lei Wen <leiwen at marvell.com>
    Cc: Haojian Zhuang <haojian.zhuang at marvell.com>
    Cc: David Woodhouse <David.Woodhouse at intel.com>
    Cc: stable at kernel.org [2.6.38+]
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at 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 9fde139..5c3af2f 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++;
 	}
 



More information about the linux-mtd-cvs mailing list