summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-07-11 11:22:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 16:56:47 -0700
commit32830f207691176234b4c4dd17f0d7ab6d87d94b (patch)
tree4b352a92dfc720418288c541d87e93594f97f859 /drivers/usb/host/ehci.h
parent3c273a056bf46167f0a1309c2ba72282a17d2541 (diff)
downloadlinux-32830f207691176234b4c4dd17f0d7ab6d87d94b.tar.gz
linux-32830f207691176234b4c4dd17f0d7ab6d87d94b.tar.bz2
linux-32830f207691176234b4c4dd17f0d7ab6d87d94b.zip
USB: EHCI: use hrtimer for unlinking empty async QHs
This patch (as1583) changes ehci-hcd to use an hrtimer event for unlinking empty (unused) async QHs instead of using a kernel timer. The check for empty QHs is moved to a new routine, where it doesn't require going through an entire scan of both the async and periodic schedules. And it can unlink multiple QHs at once, unlike the current code. 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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 1a782775881b..303c36cc99c9 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -84,6 +84,7 @@ enum ehci_hrtimer_event {
EHCI_HRTIMER_POLL_DEAD, /* Wait for dead controller to stop */
EHCI_HRTIMER_UNLINK_INTR, /* Wait for interrupt QH unlink */
EHCI_HRTIMER_FREE_ITDS, /* Wait for unused iTDs and siTDs */
+ EHCI_HRTIMER_ASYNC_UNLINKS, /* Unlink empty async QHs */
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 */
@@ -123,6 +124,7 @@ struct ehci_hcd { /* one per controller */
struct ehci_qh *async_unlink_last;
struct ehci_qh *async_iaa;
struct ehci_qh *qh_scan_next;
+ unsigned async_unlink_cycle;
unsigned async_count; /* async activity count */
/* periodic schedule support */
@@ -232,7 +234,6 @@ static inline struct usb_hcd *ehci_to_hcd (struct ehci_hcd *ehci)
enum ehci_timer_action {
TIMER_IO_WATCHDOG,
- TIMER_ASYNC_SHRINK,
};
static inline void
@@ -382,7 +383,6 @@ struct ehci_qh {
struct ehci_qtd *dummy;
struct ehci_qh *unlink_next; /* next on unlink list */
- unsigned long unlink_time;
unsigned unlink_cycle;
unsigned stamp;