diff options
author | Brian Norris <computersforpeace@gmail.com> | 2011-06-28 16:28:59 -0700 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 15:02:14 +0300 |
commit | 003bc47922047e21ebfb19cb99317273b313f79d (patch) | |
tree | c946143910669bfef21b992ae3f8a2d82fa975eb /drivers/mtd/tests | |
parent | 903cd06cd6ece7f9050a3ad5b03e0b76be2882ff (diff) | |
download | blackbird-op-linux-003bc47922047e21ebfb19cb99317273b313f79d.tar.gz blackbird-op-linux-003bc47922047e21ebfb19cb99317273b313f79d.zip |
mtd: tests: ignore corrected bitflips in OOB on mtd_readtest
read_oob may now return ECC error codes. If the code is -EUCLEAN, then
we can safely ignore the error as a corrected bitflip.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Diffstat (limited to 'drivers/mtd/tests')
-rw-r--r-- | drivers/mtd/tests/mtd_readtest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/tests/mtd_readtest.c b/drivers/mtd/tests/mtd_readtest.c index afe71aa15c4b..836792d1d60e 100644 --- a/drivers/mtd/tests/mtd_readtest.c +++ b/drivers/mtd/tests/mtd_readtest.c @@ -75,7 +75,8 @@ static int read_eraseblock_by_page(int ebnum) ops.datbuf = NULL; ops.oobbuf = oobbuf; ret = mtd->read_oob(mtd, addr, &ops); - if (ret || ops.oobretlen != mtd->oobsize) { + if ((ret && ret != -EUCLEAN) || + ops.oobretlen != mtd->oobsize) { printk(PRINT_PREF "error: read oob failed at " "%#llx\n", (long long)addr); if (!err) |