diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-07-11 11:23:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-16 19:56:47 -0400 |
commit | 18aafe64d75d0e27dae206cacf4171e4e485d285 (patch) | |
tree | da5a4c0cb9bbc664c489be69956cd275ae5e0f6b /drivers/usb/host/ehci-hub.c | |
parent | 569b394f53f0abd177cc665c9b4ace89e3f4c7fb (diff) |
USB: EHCI: use hrtimer for the I/O watchdog
This patch (as1586) replaces the kernel timer used by ehci-hcd as an
I/O watchdog with an hrtimer event.
Unlike in the current code, the watchdog event is now always enabled
whenever any isochronous URBs are active. This will prevent bugs
caused by the periodic schedule wrapping around with no completion
interrupts; the watchdog handler is guaranteed to scan the isochronous
transfers at least once during each iteration of the schedule. The
extra overhead will be negligible: one timer interrupt every 100 ms.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 5d84562e2716..05490d387fd2 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -208,7 +208,6 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) | |||
208 | 208 | ||
209 | if (time_before (jiffies, ehci->next_statechange)) | 209 | if (time_before (jiffies, ehci->next_statechange)) |
210 | msleep(5); | 210 | msleep(5); |
211 | del_timer_sync(&ehci->watchdog); | ||
212 | 211 | ||
213 | spin_lock_irq (&ehci->lock); | 212 | spin_lock_irq (&ehci->lock); |
214 | 213 | ||
@@ -316,10 +315,6 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) | |||
316 | ehci->next_hrtimer_event = EHCI_HRTIMER_NO_EVENT; | 315 | ehci->next_hrtimer_event = EHCI_HRTIMER_NO_EVENT; |
317 | spin_unlock_irq (&ehci->lock); | 316 | spin_unlock_irq (&ehci->lock); |
318 | 317 | ||
319 | /* ehci_work() may have re-enabled the watchdog timer, which we do not | ||
320 | * want, and so we must delete any pending watchdog timer events. | ||
321 | */ | ||
322 | del_timer_sync(&ehci->watchdog); | ||
323 | hrtimer_cancel(&ehci->hrtimer); | 318 | hrtimer_cancel(&ehci->hrtimer); |
324 | return 0; | 319 | return 0; |
325 | } | 320 | } |