dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Brian Norris 2011-06-28 16:28:59 -07:00 committed by Artem Bityutskiy
parent 903cd06cd6
commit 003bc47922
1 changed files with 2 additions and 1 deletions

View File

@ -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)