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 19:56:47 -0400
commit18aafe64d75d0e27dae206cacf4171e4e485d285 (patch)
treeda5a4c0cb9bbc664c489be69956cd275ae5e0f6b /drivers/usb/host/ehci.h
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.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 08637183aad0..254f414bd0bd 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -88,6 +88,7 @@ enum ehci_hrtimer_event {
88 EHCI_HRTIMER_IAA_WATCHDOG, /* Handle lost IAA interrupts */ 88 EHCI_HRTIMER_IAA_WATCHDOG, /* Handle lost IAA interrupts */
89 EHCI_HRTIMER_DISABLE_PERIODIC, /* Wait to disable periodic sched */ 89 EHCI_HRTIMER_DISABLE_PERIODIC, /* Wait to disable periodic sched */
90 EHCI_HRTIMER_DISABLE_ASYNC, /* Wait to disable async sched */ 90 EHCI_HRTIMER_DISABLE_ASYNC, /* Wait to disable async sched */
91 EHCI_HRTIMER_IO_WATCHDOG, /* Check for missing IRQs */
91 EHCI_HRTIMER_NUM_EVENTS /* Must come last */ 92 EHCI_HRTIMER_NUM_EVENTS /* Must come last */
92}; 93};
93#define EHCI_HRTIMER_NO_EVENT 99 94#define EHCI_HRTIMER_NO_EVENT 99
@@ -177,8 +178,6 @@ struct ehci_hcd { /* one per controller */
177 struct dma_pool *itd_pool; /* itd per iso urb */ 178 struct dma_pool *itd_pool; /* itd per iso urb */
178 struct dma_pool *sitd_pool; /* sitd per split iso urb */ 179 struct dma_pool *sitd_pool; /* sitd per split iso urb */
179 180
180 struct timer_list watchdog;
181 unsigned long actions;
182 unsigned random_frame; 181 unsigned random_frame;
183 unsigned long next_statechange; 182 unsigned long next_statechange;
184 ktime_t last_periodic_enable; 183 ktime_t last_periodic_enable;
@@ -235,16 +234,6 @@ static inline struct usb_hcd *ehci_to_hcd (struct ehci_hcd *ehci)
235 return container_of ((void *) ehci, struct usb_hcd, hcd_priv); 234 return container_of ((void *) ehci, struct usb_hcd, hcd_priv);
236} 235}
237 236
238enum ehci_timer_action {
239 TIMER_IO_WATCHDOG,
240};
241
242static inline void
243timer_action_done (struct ehci_hcd *ehci, enum ehci_timer_action action)
244{
245 clear_bit (action, &ehci->actions);
246}
247
248/*-------------------------------------------------------------------------*/ 237/*-------------------------------------------------------------------------*/
249 238
250#include <linux/usb/ehci_def.h> 239#include <linux/usb/ehci_def.h>