Skip to content

Commit

Permalink
mtd: pxa3xx_nand: Fix blank page ECC mismatch
Browse files Browse the repository at this point in the history
This bug was introduced in f8155a4 ("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 <[email protected]>
Acked-by: Lei Wen <[email protected]>
Cc: Haojian Zhuang <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: [email protected] [2.6.38+]
Signed-off-by: Artem Bityutskiy <[email protected]>
  • Loading branch information
zonque authored and dedekind committed Sep 11, 2011
1 parent 0fab028 commit 543e32d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mtd/nand/pxa3xx_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}

Expand Down

0 comments on commit 543e32d

Please sign in to comment.