diff options
author | Daniel Mack <zonque@gmail.com> | 2011-06-07 03:01:07 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-11 09:37:16 -0800 |
commit | 2fc862e051e87f66de8b505b339e55c509d684a3 (patch) | |
tree | 8c717a9b1135da1f75ddf7cacd6ab7e6345a4f95 | |
parent | 7b333e0ef8a1efa488ad98956c6701884b0c2b4b (diff) | |
download | lwn-2fc862e051e87f66de8b505b339e55c509d684a3.tar.gz lwn-2fc862e051e87f66de8b505b339e55c509d684a3.zip |
mtd: pxa3xx_nand: Fix blank page ECC mismatch
commit 543e32d5ff165d0d68deedb0e3557478c7c36a4a upstream.
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>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | 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 faa0edd28256..30689cc2b3c7 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++; } |