aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
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 16:56:47 -0700
commit18aafe64d75d0e27dae206cacf4171e4e485d285 (patch)
treeda5a4c0cb9bbc664c489be69956cd275ae5e0f6b /drivers/usb/host/ehci.h
parent569b394f53f0abd177cc665c9b4ace89e3f4c7fb (diff)
downloadkernel_goldelico_gta04-18aafe64d75d0e27dae206cacf4171e4e485d285.zip
kernel_goldelico_gta04-18aafe64d75d0e27dae206cacf4171e4e485d285.tar.gz
kernel_goldelico_gta04-18aafe64d75d0e27dae206cacf4171e4e485d285.tar.bz2
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.h')
-rw-r--r--drivers/usb/host/ehci.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 0863718..254f414 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -88,6 +88,7 @@ enum ehci_hrtimer_event {
EHCI_HRTIMER_IAA_WATCHDOG, /* Handle lost IAA interrupts */
EHCI_HRTIMER_DISABLE_PERIODIC, /* Wait to disable periodic sched */
EHCI_HRTIMER_DISABLE_ASYNC, /* Wait to disable async sched */
+ EHCI_HRTIMER_IO_WATCHDOG, /* Check for missing IRQs */
EHCI_HRTIMER_NUM_EVENTS /* Must come last */
};
#define EHCI_HRTIMER_NO_EVENT 99
@@ -177,8 +178,6 @@ struct ehci_hcd { /* one per controller */
struct dma_pool *itd_pool; /* itd per iso urb */
struct dma_pool *sitd_pool; /* sitd per split iso urb */
- struct timer_list watchdog;
- unsigned long actions;
unsigned random_frame;
unsigned long next_statechange;
ktime_t last_periodic_enable;
@@ -235,16 +234,6 @@ static inline struct usb_hcd *ehci_to_hcd (struct ehci_hcd *ehci)
return container_of ((void *) ehci, struct usb_hcd, hcd_priv);
}
-enum ehci_timer_action {
- TIMER_IO_WATCHDOG,
-};
-
-static inline void
-timer_action_done (struct ehci_hcd *ehci, enum ehci_timer_action action)
-{
- clear_bit (action, &ehci->actions);
-}
-
/*-------------------------------------------------------------------------*/
#include <linux/usb/ehci_def.h>