mtd: nand: use nand_check_erased_ecc_chunk in default ECC read functions
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Wed, 30 Dec 2015 19:32:04 +0000 (20:32 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 7 Jan 2016 02:48:20 +0000 (18:48 -0800)
commit40cbe6eee97b706f27bcc4c6aa1018bbe4f1e577
tree6f35750b4b83b5e709569d3e6fbbae74fb19352b
parent6e9411923b8f4c0e568cbae0f35b7ee4eb989914
mtd: nand: use nand_check_erased_ecc_chunk in default ECC read functions

The default NAND read functions are relying on the underlying controller
driver to correct bitflips, but some of those controllers cannot properly
fix bitflips in erased pages.
Check for bitflips in erased pages in default core functions if the driver
delegated the this check by setting the NAND_ECC_GENERIC_ERASED_CHECK flag.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Franklin S Cooper Jr. <fcooper@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nand_base.c
include/linux/mtd/nand.h