diff options
author | Brian Norris <computersforpeace@gmail.com> | 2011-06-28 19:28:59 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:14 -0400 |
commit | 003bc47922047e21ebfb19cb99317273b313f79d (patch) | |
tree | c946143910669bfef21b992ae3f8a2d82fa975eb | |
parent | 903cd06cd6ece7f9050a3ad5b03e0b76be2882ff (diff) |
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>
-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) | |||
75 | ops.datbuf = NULL; | 75 | ops.datbuf = NULL; |
76 | ops.oobbuf = oobbuf; | 76 | ops.oobbuf = oobbuf; |
77 | ret = mtd->read_oob(mtd, addr, &ops); | 77 | ret = mtd->read_oob(mtd, addr, &ops); |
78 | if (ret || ops.oobretlen != mtd->oobsize) { | 78 | if ((ret && ret != -EUCLEAN) || |
79 | ops.oobretlen != mtd->oobsize) { | ||
79 | printk(PRINT_PREF "error: read oob failed at " | 80 | printk(PRINT_PREF "error: read oob failed at " |
80 | "%#llx\n", (long long)addr); | 81 | "%#llx\n", (long long)addr); |
81 | if (!err) | 82 | if (!err) |