Commit 185f7a3a authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Greg Kroah-Hartman

[PATCH] pci/quirks: replace schedule_timeout() with msleep()

Description: Use msleep() instead of schedule_timeout() to guarantee the
task delays as expected.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 6f0c3359
...@@ -937,8 +937,7 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) ...@@ -937,8 +937,7 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
while (wait_time > 0 && while (wait_time > 0 &&
readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) { readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
wait_time -= 10; wait_time -= 10;
set_current_state(TASK_UNINTERRUPTIBLE); msleep(10);
schedule_timeout((HZ*10 + 999) / 1000);
} }
} }
...@@ -987,8 +986,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) ...@@ -987,8 +986,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
wait_time = 500; wait_time = 500;
do { do {
set_current_state(TASK_UNINTERRUPTIBLE); msleep(10);
schedule_timeout((HZ*10+999)/1000);
wait_time -= 10; wait_time -= 10;
pci_read_config_dword(pdev, pci_read_config_dword(pdev,
hcc_params + EHCI_USBLEGSUP, hcc_params + EHCI_USBLEGSUP,
......
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