]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: mtd_oobtest: Handle bitflips during reads
authorMiquel Raynal <miquel.raynal@free-electrons.com>
Thu, 11 Jan 2018 20:39:20 +0000 (21:39 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 12 Jan 2018 09:24:08 +0000 (10:24 +0100)
commit3d06238e70b161ea9f0d53dff6f2082eed8eb7dd
tree8f7ccf588da802e26fc34653b535292d47d4706e
parent51876adfcfb9b42439be4326c355e496a6b17fa3
mtd: mtd_oobtest: Handle bitflips during reads

Reads from NAND devices usually trigger bitflips, this is an expected
behavior. While bitflips are under a given threshold, the MTD core
returns 0. However, when the number of corrected bitflips is above this
same threshold, -EUCLEAN is returned to inform the upper layer that this
block is slightly dying and soon the ECC engine will be overtaken so
actions should be taken to move the data out of it.

This particular condition should not be treated like an error and the
test should continue.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/tests/oobtest.c