From df144b6ca77e6988ff6876a7d37910b9b300c4df Mon Sep 17 00:00:00 2001 From: Graff Yang Date: Mon, 2 Mar 2009 16:31:29 +0800 Subject: [PATCH] --- yaml --- r: 142306 b: refs/heads/master c: 6ac15e92dfd3064ae484e2e823890622476c4356 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mtd/chips/cfi_cmdset_0001.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 7f2853c27288..b7daae69527b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 610f75e74b636f933bc3e379a88a10f883b91332 +refs/heads/master: 6ac15e92dfd3064ae484e2e823890622476c4356 diff --git a/trunk/drivers/mtd/chips/cfi_cmdset_0001.c b/trunk/drivers/mtd/chips/cfi_cmdset_0001.c index f5ab6fa1057b..c240454fd113 100644 --- a/trunk/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/trunk/drivers/mtd/chips/cfi_cmdset_0001.c @@ -1236,10 +1236,14 @@ static int inval_cache_and_wait_for_operation( remove_wait_queue(&chip->wq, &wait); spin_lock(chip->mutex); } - if (chip->erase_suspended || chip->write_suspended) { - /* Suspend has occured while sleep: reset timeout */ + if (chip->erase_suspended && chip_state == FL_ERASING) { + /* Erase suspend occured while sleep: reset timeout */ timeo = reset_timeo; chip->erase_suspended = 0; + } + if (chip->write_suspended && chip_state == FL_WRITING) { + /* Write suspend occured while sleep: reset timeout */ + timeo = reset_timeo; chip->write_suspended = 0; } }