[PATCH] mtd: nand: ignore ecc errors during bbt reads
Mike Dunn
mikedunn at newsguy.com
Thu Jun 7 14:32:08 EDT 2012
Ignore ecc errors in the scan_read_raw_oob() function. Also removed code that
is now redundant.
Signed-off-by: Mike Dunn <mikedunn at newsguy.com>
---
drivers/mtd/nand/nand_bbt.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 30d1319..585da44 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -319,7 +319,8 @@ static int scan_read_raw_oob(struct mtd_info *mtd, uint8_t *buf, loff_t offs,
res = mtd_read_oob(mtd, offs, &ops);
- if (res)
+ /* Ignore ECC errors when checking for BBM */
+ if (res && !mtd_is_bitflip_or_eccerr(res))
return res;
buf += mtd->oobsize + mtd->writesize;
@@ -406,8 +407,7 @@ static int scan_block_full(struct mtd_info *mtd, struct nand_bbt_descr *bd,
int ret, j;
ret = scan_read_raw_oob(mtd, buf, offs, readlen);
- /* Ignore ECC errors when checking for BBM */
- if (ret && !mtd_is_bitflip_or_eccerr(ret))
+ if (ret)
return ret;
for (j = 0; j < len; j++, buf += scanlen) {
--
1.7.3.4
More information about the linux-mtd
mailing list