Commit fb49454b1b6c7c6e238ac3c0b1e302e73eb1a1ea
nand: reinstate lazy bad block scanning
commit 2a8e0fc8b3dc31a3c571e439fbf04b882c8986be ("nand: Merge changes from Linux nand driver") accidentally reverted commit 13f0fd94e3cae6f8a0d9fba5d367e311edc8ebde ("NAND: Scan bad blocks lazily."). Reinstate the change, as amended by commit ff49ea8977b56916edd5b1766d9939010e30b181 ("NAND: Mark the BBT as scanned prior to calling scan_bbt."). Signed-off-by: Scott Wood <scottwood@freescale.com>
Showing 2 changed files with 9 additions and 3 deletions Side-by-side Diff
... | ... | @@ -479,6 +479,11 @@ |
479 | 479 | { |
480 | 480 | struct nand_chip *chip = mtd->priv; |
481 | 481 | |
482 | + if (!(chip->options & NAND_BBT_SCANNED)) { | |
483 | + chip->options |= NAND_BBT_SCANNED; | |
484 | + chip->scan_bbt(mtd); | |
485 | + } | |
486 | + | |
482 | 487 | if (!chip->bbt) |
483 | 488 | return chip->block_bad(mtd, ofs, getchip); |
484 | 489 | |
485 | 490 | |
... | ... | @@ -3166,10 +3171,9 @@ |
3166 | 3171 | |
3167 | 3172 | /* Check, if we should skip the bad block table scan */ |
3168 | 3173 | if (chip->options & NAND_SKIP_BBTSCAN) |
3169 | - return 0; | |
3174 | + chip->options |= NAND_BBT_SCANNED; | |
3170 | 3175 | |
3171 | - /* Build bad block table */ | |
3172 | - return chip->scan_bbt(mtd); | |
3176 | + return 0; | |
3173 | 3177 | } |
3174 | 3178 | |
3175 | 3179 | /** |
... | ... | @@ -232,6 +232,8 @@ |
232 | 232 | #define NAND_CREATE_EMPTY_BBT 0x01000000 |
233 | 233 | |
234 | 234 | /* Options set by nand scan */ |
235 | +/* bbt has already been read */ | |
236 | +#define NAND_BBT_SCANNED 0x40000000 | |
235 | 237 | /* Nand scan has allocated controller struct */ |
236 | 238 | #define NAND_CONTROLLER_ALLOC 0x80000000 |
237 | 239 |
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee
-
mentioned in commit 35c204
-
mentioned in commit bf80ee