]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: Ensure the number of bitflips is consistent
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 19 May 2020 07:45:44 +0000 (09:45 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 24 May 2020 18:48:11 +0000 (20:48 +0200)
commit34bb4c0d3479fb3b4ad8dcb8cf26746507de8f9b
tree3c068c9ba429caf49b0e0d50347f9d6830cc4d72
parentdf944e635923c7817a046523777f079644df8b73
mtd: rawnand: Ensure the number of bitflips is consistent

The main NAND read page function can loop over "page reads" many times
in if the reading reports uncorrectable error(s) and if the chip
supports the read_retry feature.

In this case, the number of bitflips is summarized between
attempts. Fix this by re-initializing the entire mtd_ecc_stats object
each time we retry.

Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200519074549.23673-4-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/nand_base.c