mtd: nand: pxa3xx: re-read a page in raw mode on uncorrectable error
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 11 Oct 2018 15:45:43 +0000 (17:45 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 22 Nov 2018 06:08:05 +0000 (11:38 +0530)
commitaf61ea27f51fce62188276d7b5682ac51b03a705
tree42299cc1a2d133b5bf6099b2697184f067260fc5
parent6293b0361d9816dc5286cd766d4865a30ebdfb6f
mtd: nand: pxa3xx: re-read a page in raw mode on uncorrectable error

This only applies on BCH path.

When an empty page is read, it triggers an uncorrectable error. While
this is expected, the ECC engine might produce itself bitflips in the
read data under certain layouts. To overcome this situation, always
re-read the entire page in raw mode and check for the whole page to be
empty.

Also report the right number of bitflips if there are any.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Jagan Teki <jagan@openedev.com>
drivers/mtd/nand/raw/pxa3xx_nand.c