From: Adrian Hunter Date: Mon, 22 Jan 2007 12:30:31 +0000 (+0900) Subject: [MTD] OneNAND: Check first or second pages for bad block information X-Git-Tag: v2.6.21-rc1~66^2~27^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec255e34061bbc48fc702875336c6db969df9461;p=linux-2.6 [MTD] OneNAND: Check first or second pages for bad block information 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 Signed-off-by: Kyungmin Park --- diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c index 90db8f5b1f..aa46b7f6f4 100644 --- a/drivers/mtd/onenand/onenand_bbt.c +++ b/drivers/mtd/onenand/onenand_bbt.c @@ -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;