public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: ignore ecc errors during bbt reads
@ 2012-06-07 18:32 Mike Dunn
  2012-06-10 11:50 ` Shmulik Ladkani
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Dunn @ 2012-06-07 18:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: Mike Dunn

Ignore ecc errors in the scan_read_raw_oob() function.  Also removed code that
is now redundant.

Signed-off-by: Mike Dunn <mikedunn@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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-06-12 13:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 18:32 [PATCH] mtd: nand: ignore ecc errors during bbt reads Mike Dunn
2012-06-10 11:50 ` Shmulik Ladkani
2012-06-11  5:45   ` Brian Norris
2012-06-11  6:41     ` Shmulik Ladkani
2012-06-11  6:53       ` Brian Norris
2012-06-12 10:37     ` Artem Bityutskiy
2012-06-12 13:23     ` Mike Dunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox