Commit 18a1de8b authored by Dave Boutcher's avatar Dave Boutcher Committed by James Bottomley

[PATCH] ibmvscsi: replace schedule_timeout() with msleep()

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: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarDave Boutcher <boutcher@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 21efb895
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <asm/vio.h> #include <asm/vio.h>
#include <scsi/scsi.h> #include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h> #include <scsi/scsi_cmnd.h>
...@@ -1327,8 +1328,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id) ...@@ -1327,8 +1328,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
time_before(jiffies, wait_switch) && time_before(jiffies, wait_switch) &&
atomic_read(&hostdata->request_limit) < 0;) { atomic_read(&hostdata->request_limit) < 0;) {
set_current_state(TASK_UNINTERRUPTIBLE); msleep(10);
schedule_timeout(HZ / 100);
} }
/* if we now have a valid request_limit, initiate a scan */ /* if we now have a valid request_limit, initiate a scan */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment