mtd: nand: fsl_ifc: fix handing of bit flips in erased pages
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Sat, 10 Jun 2017 10:09:05 +0000 (12:09 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Sat, 10 Jun 2017 10:09:05 +0000 (12:09 +0200)
commitd45e5316e6a5071dbfe44bae04a89a3ba75e1ea9
tree42d9e94642125a6fdde600f91a5cda6d65654f2a
parent30ee809e980b07f467fca3e7ee16e8d034cf41af
mtd: nand: fsl_ifc: fix handing of bit flips in erased pages

If we see unrecoverable ECC error, we need to count number of bitflips
from all-ones and report correctable/uncorrectable according to
that. Otherwise we report ECC failed on erased flash with single bit error.

Signed-off-by: Pavel Machek <pavel@denx.de>
Reported-by: Darwin Dingel <Darwin.Dingel@alliedtelesis.co.nz>
Acked-by: Darwin Dingel <Darwin.Dingel@alliedtelesis.co.nz>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/fsl_ifc_nand.c