Message ID | 4C6B024A.7040505@broadcom.com |
---|---|
State | Accepted |
Commit | 065a1ed8de85583888b3d4f22c64b534a1fbdaaa |
Headers | show |
On 17 Aug 10 14:42, Brian Norris wrote: > In place of that, though, you can just try this patch on 2.6.36-rc1. > I believe it should satisfy the intention of my previous (faulty) > commit while reverting the regression behavior. If this works OK, I > will submit it to be included in the mainline kernel. Hi Brian, Applying this patch fixes the problem for me. I removed my workaround and just tried your patch and was able to mount both mtdblock devices. Thank you for fixing this, Michael Guntsche
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index a3c7473..a22ed7b 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2934,14 +2934,10 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 32 - 1; /* Set the bad block position */ - if (!(busw & NAND_BUSWIDTH_16) && (*maf_id == NAND_MFR_STMICRO || - (*maf_id == NAND_MFR_SAMSUNG && - mtd->writesize == 512) || - *maf_id == NAND_MFR_AMD)) - chip->badblockpos = NAND_SMALL_BADBLOCK_POS; - else + if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16)) chip->badblockpos = NAND_LARGE_BADBLOCK_POS; - + else + chip->badblockpos = NAND_SMALL_BADBLOCK_POS; /* Get chip options, preserve non chip based options */ chip->options &= ~NAND_CHIPOPTIONS_MSK;