* [patch 1/4] ibmvscsi.c: replace schedule_timeout() with msleep()
@ 2004-11-29 20:29 Dave C Boutcher
0 siblings, 0 replies; only message in thread
From: Dave C Boutcher @ 2004-11-29 20:29 UTC (permalink / raw)
To: linux-scsi
Description: Use msleep() instead of schedule_timeout()
to guarantee the task delays as expected. Originally
submitted to linux-scsi by the janitors, and resubmitted
by boutcher (after testing :-)
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Dave Boutcher <boutcher@us.ibm.com>
---
linux-2.6.9-max/drivers/scsi/ibmvscsi/ibmvscsi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~msleep-drivers_scsi_ibmvscsi drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.6.9/drivers/scsi/ibmvscsi/ibmvscsi.c~msleep-drivers_scsi_ibmvscsi 2004-10-21 02:41:22.000000000 +0200
+++ linux-2.6.9-max/drivers/scsi/ibmvscsi/ibmvscsi.c 2004-10-21 02:41:22.000000000 +0200
@@ -69,6 +69,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/dma-mapping.h>
+#include <linux/delay.h>
#include <asm/vio.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
@@ -1327,8 +1328,7 @@ static int ibmvscsi_probe(struct vio_dev
time_before(jiffies, wait_switch) &&
atomic_read(&hostdata->request_limit) < 0;) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ / 100);
+ msleep(10);
}
/* if we now have a valid request_limit, initiate a scan */
--
Dave Boutcher
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-11-29 20:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-29 20:29 [patch 1/4] ibmvscsi.c: replace schedule_timeout() with msleep() Dave C Boutcher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).