mtd: tests: ignore corrected bitflips in OOB on mtd_readtest
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Nov 7 11:59:24 EST 2011
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=003bc47922047e21ebfb19cb99317273b313f79d
Commit: 003bc47922047e21ebfb19cb99317273b313f79d
Parent: 903cd06cd6ece7f9050a3ad5b03e0b76be2882ff
Author: Brian Norris <computersforpeace at gmail.com>
AuthorDate: Tue Jun 28 16:28:59 2011 -0700
Committer: Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Sun Sep 11 15:02:14 2011 +0300
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 at gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1 at gmail.com>
---
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 afe71aa..836792d 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)
More information about the linux-mtd-cvs
mailing list