aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-09-28 16:01:23 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-22 11:57:43 -0400
commitc3ee9b76aa93fbf59727e02fac9914c7355108f3 (patch)
tree6a5456490de55f56b6fa0bf778db6f7f8a764616 /drivers/usb/host/ehci.h
parent6f0c0580b70c89094b3422ba81118c7b959c7556 (diff)
EHCI: improved logic for isochronous scheduling
This patch (as1608) reworks the logic used by ehci-hcd for scheduling isochronous transfers. Now the modular calculations are all based on a window that starts at the last frame scanned for isochronous completions. No transfer descriptors for any earlier frames can possibly remain on the schedule, so there can be no confusion from schedule wrap-around. This removes the need for a "slop" region of arbitrary size. There's no need to check for URBs that are longer than the schedule length. With the old code they could throw things off by wrapping around and appearing to end in the near future rather than the distant future. Now such confusion isn't possible, and the existing test for submissions that extend too far into the future will also catch those that exceed the schedule length. (But there still has to be an initial test to handle the case where the schedule already extends as far into the future as possible.) Delays caused by IRQ latency won't confuse the algorithm unless they are ridiculously long (over 250 ms); they will merely reduce how far into the future new transfers can be scheduled. A few people have reported problems caused by delays of 50 ms or so. Now instead of failing completely, isochronous transfers will experience a brief glitch and then continue normally. (Whether this is truly a good thing is debatable. A latency as large as 50 ms generally indicates a bug is present, and complete failure of audio or video transfers draws people's attention pretty vividly. Making the transfers more robust also makes it easier for such bugs to remain undetected.) Finally, ehci->next_frame is renamed to ehci->last_iso_frame, because that better describes what it is: the last frame to have been scanned for isochronous completions. 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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index da07d98f7d1d..0564a63f5eb3 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -143,7 +143,7 @@ struct ehci_hcd { /* one per controller */
143 struct ehci_qh *intr_unlink_last; 143 struct ehci_qh *intr_unlink_last;
144 unsigned intr_unlink_cycle; 144 unsigned intr_unlink_cycle;
145 unsigned now_frame; /* frame from HC hardware */ 145 unsigned now_frame; /* frame from HC hardware */
146 unsigned next_frame; /* scan periodic, start here */ 146 unsigned last_iso_frame; /* last frame scanned for iso */
147 unsigned intr_count; /* intr activity count */ 147 unsigned intr_count; /* intr activity count */
148 unsigned isoc_count; /* isoc activity count */ 148 unsigned isoc_count; /* isoc activity count */
149 unsigned periodic_count; /* periodic activity count */ 149 unsigned periodic_count; /* periodic activity count */