瀏覽代碼

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@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>
Daniel Mack 14 年之前
父節點
當前提交
543e32d5ff
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/mtd/nand/pxa3xx_nand.c

+ 2 - 0
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
 		 * OOB, ignore such double bit errors
 		 */
 		 */
 		if (is_buf_blank(buf, mtd->writesize))
 		if (is_buf_blank(buf, mtd->writesize))
+			info->retcode = ERR_NONE;
+		else
 			mtd->ecc_stats.failed++;
 			mtd->ecc_stats.failed++;
 	}
 	}