[MTD] OneNAND: Check first or second pages for bad block information
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Mon, 22 Jan 2007 12:30:31 +0000 (21:30 +0900)
committerKyungmin Park <kyungmin.park@samsung.com>
Mon, 22 Jan 2007 12:30:31 +0000 (21:30 +0900)
OneNAND records bad block information in the out-of-band area of either the first or second page of a block.  Due to a logic error, only the first page was being checked.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/mtd/onenand/onenand_bbt.c

index 90db8f5b1f8494e5e65867f8d60cf32873c43de1..aa46b7f6f4961aa66798336fc644e2add6b865b9 100644 (file)
@@ -68,7 +68,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
 
        printk(KERN_INFO "Scanning device for bad blocks\n");
 
-       len = 1;
+       len = 2;
 
        /* We need only read few bytes from the OOB area */
        scanlen = ooblen = 0;