mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-01 00:36:40 +09:00
mtd: pxa3xx_nand: Fix blank page ECC mismatch
commit543e32d5ffupstream. This bug was introduced inf8155a40("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
33e73819e7
commit
4d25350da9
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user