diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-07-11 11:23:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-16 19:56:47 -0400 |
commit | f42890782241a60d107f23d08089a4a12b507a11 (patch) | |
tree | 8e2049cf96ccdbfa7bca7bdbfb38aa329c18325d /drivers/usb/host/ehci.h | |
parent | 18aafe64d75d0e27dae206cacf4171e4e485d285 (diff) |
USB: EHCI: simplify isochronous scanning
This patch (as1587) simplifies ehci-hcd's scan_isoc() routine by
eliminating some local variables, declaring boolean-valued values as
bool rather than unsigned, changing variable names to make more sense,
and so on.
The logic at the end of the routine is cut down significantly. The
scanning doesn't have to catch up all the way to where the hardware
is; it merely has to catch up to where the hardware was when the last
interrupt occurred. If the hardware has made more progress since then
and issued another interrupt, a rescan will catch up to it.
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.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 254f414bd0bd..7de58fe52d51 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -141,19 +141,19 @@ struct ehci_hcd { /* one per controller */ | |||
141 | struct ehci_qh *intr_unlink; | 141 | struct ehci_qh *intr_unlink; |
142 | struct ehci_qh *intr_unlink_last; | 142 | struct ehci_qh *intr_unlink_last; |
143 | unsigned intr_unlink_cycle; | 143 | unsigned intr_unlink_cycle; |
144 | int next_uframe; /* scan periodic, start here */ | 144 | unsigned now_frame; /* frame from HC hardware */ |
145 | unsigned next_frame; /* scan periodic, start here */ | ||
145 | unsigned intr_count; /* intr activity count */ | 146 | unsigned intr_count; /* intr activity count */ |
146 | unsigned isoc_count; /* isoc activity count */ | 147 | unsigned isoc_count; /* isoc activity count */ |
147 | unsigned periodic_count; /* periodic activity count */ | 148 | unsigned periodic_count; /* periodic activity count */ |
148 | unsigned uframe_periodic_max; /* max periodic time per uframe */ | 149 | unsigned uframe_periodic_max; /* max periodic time per uframe */ |
149 | 150 | ||
150 | 151 | ||
151 | /* list of itds & sitds completed while clock_frame was still active */ | 152 | /* list of itds & sitds completed while now_frame was still active */ |
152 | struct list_head cached_itd_list; | 153 | struct list_head cached_itd_list; |
153 | struct ehci_itd *last_itd_to_free; | 154 | struct ehci_itd *last_itd_to_free; |
154 | struct list_head cached_sitd_list; | 155 | struct list_head cached_sitd_list; |
155 | struct ehci_sitd *last_sitd_to_free; | 156 | struct ehci_sitd *last_sitd_to_free; |
156 | unsigned clock_frame; | ||
157 | 157 | ||
158 | /* per root hub port */ | 158 | /* per root hub port */ |
159 | unsigned long reset_done [EHCI_MAX_ROOT_PORTS]; | 159 | unsigned long reset_done [EHCI_MAX_ROOT_PORTS]; |