mtd/drivers/mtd/chips amd_flash.c, 1.25, 1.26 cfi_cmdset_0002.c,
1.111, 1.112 cfi_cmdset_0020.c, 1.16, 1.17
David Woodhouse
dwmw2 at infradead.org
Sat Nov 20 07:49:07 EST 2004
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv18174
Modified Files:
amd_flash.c cfi_cmdset_0002.c cfi_cmdset_0020.c
Log Message:
Description: Use msleep() instead of schedule_timeout()
to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
Signed-off-by: Maximilian Attems <janitor at sternwelten.at>
Index: amd_flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/amd_flash.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- amd_flash.c 9 Aug 2004 13:19:43 -0000 1.25
+++ amd_flash.c 20 Nov 2004 12:49:04 -0000 1.26
@@ -1122,7 +1122,7 @@
timeo = jiffies + (HZ * 20);
spin_unlock_bh(chip->mutex);
- schedule_timeout(HZ);
+ msleep(1000);
spin_lock_bh(chip->mutex);
while (flash_is_busy(map, adr, private->interleave)) {
Index: cfi_cmdset_0002.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0002.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- cfi_cmdset_0002.c 16 Nov 2004 18:29:00 -0000 1.111
+++ cfi_cmdset_0002.c 20 Nov 2004 12:49:04 -0000 1.112
@@ -1173,8 +1173,7 @@
chip->in_progress_block_addr = adr;
cfi_spin_unlock(chip->mutex);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((chip->erase_time*HZ)/(2*1000));
+ msleep(chip->erase_time/2);
cfi_spin_lock(chip->mutex);
timeo = jiffies + (HZ*20);
@@ -1259,8 +1258,7 @@
chip->in_progress_block_addr = adr;
cfi_spin_unlock(chip->mutex);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((chip->erase_time*HZ)/(2*1000));
+ msleep(chip->erase_time/2);
cfi_spin_lock(chip->mutex);
timeo = jiffies + (HZ*20);
Index: cfi_cmdset_0020.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0020.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- cfi_cmdset_0020.c 16 Nov 2004 18:29:00 -0000 1.16
+++ cfi_cmdset_0020.c 20 Nov 2004 12:49:04 -0000 1.17
@@ -788,7 +788,7 @@
chip->state = FL_ERASING;
spin_unlock_bh(chip->mutex);
- schedule_timeout(HZ);
+ msleep(1000);
spin_lock_bh(chip->mutex);
/* FIXME. Use a timer to check this, and return immediately. */
@@ -1087,7 +1087,7 @@
chip->state = FL_LOCKING;
spin_unlock_bh(chip->mutex);
- schedule_timeout(HZ);
+ msleep(1000);
spin_lock_bh(chip->mutex);
/* FIXME. Use a timer to check this, and return immediately. */
@@ -1236,7 +1236,7 @@
chip->state = FL_UNLOCKING;
spin_unlock_bh(chip->mutex);
- schedule_timeout(HZ);
+ msleep(1000);
spin_lock_bh(chip->mutex);
/* FIXME. Use a timer to check this, and return immediately. */
More information about the linux-mtd-cvs
mailing list