aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-sched.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-07-11 11:23:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 19:56:47 -0400
commit18aafe64d75d0e27dae206cacf4171e4e485d285 (patch)
treeda5a4c0cb9bbc664c489be69956cd275ae5e0f6b /drivers/usb/host/ehci-sched.c
parent569b394f53f0abd177cc665c9b4ace89e3f4c7fb (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-sched.c')
-rw-r--r--drivers/usb/host/ehci-sched.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 263b542985c0..26ce8fef0e5b 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -489,6 +489,7 @@ static void enable_periodic(struct ehci_hcd *ehci)
489 489
490 /* Don't start the schedule until PSS is 0 */ 490 /* Don't start the schedule until PSS is 0 */
491 ehci_poll_PSS(ehci); 491 ehci_poll_PSS(ehci);
492 turn_on_io_watchdog(ehci);
492} 493}
493 494
494static void disable_periodic(struct ehci_hcd *ehci) 495static void disable_periodic(struct ehci_hcd *ehci)
@@ -1649,7 +1650,6 @@ static void itd_link_urb(
1649 iso_sched_free (stream, iso_sched); 1650 iso_sched_free (stream, iso_sched);
1650 urb->hcpriv = NULL; 1651 urb->hcpriv = NULL;
1651 1652
1652 timer_action (ehci, TIMER_IO_WATCHDOG);
1653 ++ehci->isoc_count; 1653 ++ehci->isoc_count;
1654 enable_periodic(ehci); 1654 enable_periodic(ehci);
1655} 1655}
@@ -2052,7 +2052,6 @@ static void sitd_link_urb(
2052 iso_sched_free (stream, sched); 2052 iso_sched_free (stream, sched);
2053 urb->hcpriv = NULL; 2053 urb->hcpriv = NULL;
2054 2054
2055 timer_action (ehci, TIMER_IO_WATCHDOG);
2056 ++ehci->isoc_count; 2055 ++ehci->isoc_count;
2057 enable_periodic(ehci); 2056 enable_periodic(ehci);
2058} 2057}