aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index f5ab6fa1057b..c240454fd113 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -1236,10 +1236,14 @@ static int inval_cache_and_wait_for_operation(
1236 remove_wait_queue(&chip->wq, &wait); 1236 remove_wait_queue(&chip->wq, &wait);
1237 spin_lock(chip->mutex); 1237 spin_lock(chip->mutex);
1238 } 1238 }
1239 if (chip->erase_suspended || chip->write_suspended) { 1239 if (chip->erase_suspended && chip_state == FL_ERASING) {
1240 /* Suspend has occured while sleep: reset timeout */ 1240 /* Erase suspend occured while sleep: reset timeout */
1241 timeo = reset_timeo; 1241 timeo = reset_timeo;
1242 chip->erase_suspended = 0; 1242 chip->erase_suspended = 0;
1243 }
1244 if (chip->write_suspended && chip_state == FL_WRITING) {
1245 /* Write suspend occured while sleep: reset timeout */
1246 timeo = reset_timeo;
1243 chip->write_suspended = 0; 1247 chip->write_suspended = 0;
1244 } 1248 }
1245 } 1249 }