Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242791
b: refs/heads/master
c: e21fa86
h: refs/heads/master
i:
  242789: b92ec3a
  242787: 67a2db7
  242783: 7ec18ca
v: v3
  • Loading branch information
Yang Ruirui authored and Artem Bityutskiy committed Mar 25, 2011
1 parent 606a6e2 commit e192ca2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc2ff592b5b41f3f32e790dd124eeb3bc80706c8
refs/heads/master: e21fa86ad0ffa2c292b104ea19bdaa46ceab7105
8 changes: 0 additions & 8 deletions trunk/drivers/mtd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,6 @@ config MTD_SWAP
The driver provides wear leveling by storing erase counter into the
OOB.

config MTD_SWAP_STRICT
bool "Strict erase error handling"
depends on MTD_SWAP
help
Enables strict tolerance on failed erasures, marking erase blocks bad
right after the first failed operation. With non-strict mode the
erase operation is retried.

source "drivers/mtd/chips/Kconfig"

source "drivers/mtd/maps/Kconfig"
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/mtd/mtdswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ struct mtdswap_oobdata {
#define MTDSWAP_ERASE_RETRIES 3 /* Before marking erase block bad */
#define MTDSWAP_IO_RETRIES 3

#ifdef CONFIG_MTD_SWAP_STRICT
#define MTDSWAP_STRICT 1
#else
#define MTDSWAP_STRICT 0
#endif

enum {
MTDSWAP_SCANNED_CLEAN,
MTDSWAP_SCANNED_DIRTY,
Expand Down Expand Up @@ -575,7 +569,7 @@ static int mtdswap_erase_block(struct mtdswap_dev *d, struct swap_eb *eb)

ret = mtd->erase(mtd, &erase);
if (ret) {
if (retries++ < MTDSWAP_ERASE_RETRIES && !MTDSWAP_STRICT) {
if (retries++ < MTDSWAP_ERASE_RETRIES) {
dev_warn(d->dev,
"erase of erase block %#llx on %s failed",
erase.addr, mtd->name);
Expand Down

0 comments on commit e192ca2

Please sign in to comment.