Re: [PATCH] PCI fixes for 2.6.9

From: Greg KH
Date: Wed Oct 20 2004 - 01:31:42 EST


ChangeSet 1.1997.37.49, 2004/10/06 13:44:51-07:00, nacc@xxxxxxxxxx

[PATCH] pci hotplug/pciehp: 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/pciehp.h | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)


diff -Nru a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
--- a/drivers/pci/hotplug/pciehp.h 2004-10-19 15:23:11 -07:00
+++ b/drivers/pci/hotplug/pciehp.h 2004-10-19 15:23:11 -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"
@@ -261,14 +262,12 @@

dbg("%s : start\n", __FUNCTION__);
add_wait_queue(&ctrl->queue, &wait);
- set_current_state(TASK_INTERRUPTIBLE);
- if (!pciehp_poll_mode) {
+ if (!pciehp_poll_mode)
/* Sleep for up to 1 second */
- schedule_timeout(1*HZ);
- } else
- schedule_timeout(2.5*HZ);
+ msleep_interruptible(1000);
+ else
+ msleep_interruptible(2500);

- 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/