Re: [PATCH] PCI fixes for 2.6.9

From: Greg KH
Date: Wed Oct 20 2004 - 01:02:18 EST


ChangeSet 1.1997.37.48, 2004/10/06 13:44:26-07:00, nacc@xxxxxxxxxx

[PATCH] pci hotplug/shpchp: replace schedule_timeout() with msleep_interruptible()

Use msleep_interruptible() instead of schedule_timeout() to guarantee
the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


drivers/pci/hotplug/shpchp.h | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)


diff -Nru a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
--- a/drivers/pci/hotplug/shpchp.h 2004-10-19 15:23:17 -07:00
+++ b/drivers/pci/hotplug/shpchp.h 2004-10-19 15:23:17 -07:00
@@ -31,6 +31,7 @@

#include <linux/types.h>
#include <linux/pci.h>
+#include <linux/delay.h>
#include <asm/semaphore.h>
#include <asm/io.h>
#include "pci_hotplug.h"
@@ -381,16 +382,14 @@
dbg("%s : start\n",__FUNCTION__);

add_wait_queue(&ctrl->queue, &wait);
- set_current_state(TASK_INTERRUPTIBLE);

if (!shpchp_poll_mode) {
/* Sleep for up to 1 second */
- schedule_timeout(1*HZ);
+ msleep_interruptible(1000);
} else {
/* Sleep for up to 2 seconds */
- schedule_timeout(2*HZ);
+ msleep_interruptible(2000);
}
- set_current_state(TASK_RUNNING);
remove_wait_queue(&ctrl->queue, &wait);
if (signal_pending(current))
retval = -EINTR;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/