diff options
-rw-r--r-- | drivers/mtd/Kconfig | 8 | ||||
-rw-r--r-- | drivers/mtd/mtdswap.c | 8 |
2 files changed, 1 insertions, 15 deletions
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 5fe01d556657..b4567c35a322 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig | |||
@@ -335,14 +335,6 @@ config MTD_SWAP | |||
335 | The driver provides wear leveling by storing erase counter into the | 335 | The driver provides wear leveling by storing erase counter into the |
336 | OOB. | 336 | OOB. |
337 | 337 | ||
338 | config MTD_SWAP_STRICT | ||
339 | bool "Strict erase error handling" | ||
340 | depends on MTD_SWAP | ||
341 | help | ||
342 | Enables strict tolerance on failed erasures, marking erase blocks bad | ||
343 | right after the first failed operation. With non-strict mode the | ||
344 | erase operation is retried. | ||
345 | |||
346 | source "drivers/mtd/chips/Kconfig" | 338 | source "drivers/mtd/chips/Kconfig" |
347 | 339 | ||
348 | source "drivers/mtd/maps/Kconfig" | 340 | source "drivers/mtd/maps/Kconfig" |
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index a65594fee4a3..dc4b136800b8 100644 --- a/drivers/mtd/mtdswap.c +++ b/drivers/mtd/mtdswap.c | |||
@@ -156,12 +156,6 @@ struct mtdswap_oobdata { | |||
156 | #define MTDSWAP_ERASE_RETRIES 3 /* Before marking erase block bad */ | 156 | #define MTDSWAP_ERASE_RETRIES 3 /* Before marking erase block bad */ |
157 | #define MTDSWAP_IO_RETRIES 3 | 157 | #define MTDSWAP_IO_RETRIES 3 |
158 | 158 | ||
159 | #ifdef CONFIG_MTD_SWAP_STRICT | ||
160 | #define MTDSWAP_STRICT 1 | ||
161 | #else | ||
162 | #define MTDSWAP_STRICT 0 | ||
163 | #endif | ||
164 | |||
165 | enum { | 159 | enum { |
166 | MTDSWAP_SCANNED_CLEAN, | 160 | MTDSWAP_SCANNED_CLEAN, |
167 | MTDSWAP_SCANNED_DIRTY, | 161 | MTDSWAP_SCANNED_DIRTY, |
@@ -575,7 +569,7 @@ retry: | |||
575 | 569 | ||
576 | ret = mtd->erase(mtd, &erase); | 570 | ret = mtd->erase(mtd, &erase); |
577 | if (ret) { | 571 | if (ret) { |
578 | if (retries++ < MTDSWAP_ERASE_RETRIES && !MTDSWAP_STRICT) { | 572 | if (retries++ < MTDSWAP_ERASE_RETRIES) { |
579 | dev_warn(d->dev, | 573 | dev_warn(d->dev, |
580 | "erase of erase block %#llx on %s failed", | 574 | "erase of erase block %#llx on %s failed", |
581 | erase.addr, mtd->name); | 575 | erase.addr, mtd->name); |