diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-05-12 11:35:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 18:04:11 -0400 |
commit | 84afddd7ac58adad00cb0e50d0af25fcf825668b (patch) | |
tree | b528f0169ae61309ea4a0020bd53504f8faa827e /drivers/usb/host/uhci-hcd.c | |
parent | 04538a255ac8b404c20cbf15867c9829254c470f (diff) |
[PATCH] UHCI: Reimplement FSBR
This patch (as683) re-implements Full-Speed Bandwidth Reclamation (FSBR)
properly. It keeps track of which endpoint queues have advanced, and
when none have advanced for a sufficiently long time, FSBR is turned
off. The next TD on each of the non-moving queues is modified to
generate an interrupt on completion, so that FSBR can be re-enabled as
soon as the hardware starts to make some progress.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-hcd.c')
-rw-r--r-- | drivers/usb/host/uhci-hcd.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index fb4c1a8cadf4..395402eec5ef 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
@@ -88,15 +88,6 @@ static void suspend_rh(struct uhci_hcd *uhci, enum uhci_rh_state new_state); | |||
88 | static void wakeup_rh(struct uhci_hcd *uhci); | 88 | static void wakeup_rh(struct uhci_hcd *uhci); |
89 | static void uhci_get_current_frame_number(struct uhci_hcd *uhci); | 89 | static void uhci_get_current_frame_number(struct uhci_hcd *uhci); |
90 | 90 | ||
91 | /* If a transfer is still active after this much time, turn off FSBR */ | ||
92 | #define IDLE_TIMEOUT msecs_to_jiffies(50) | ||
93 | #define FSBR_DELAY msecs_to_jiffies(50) | ||
94 | |||
95 | /* When we timeout an idle transfer for FSBR, we'll switch it over to */ | ||
96 | /* depth first traversal. We'll do it in groups of this number of TDs */ | ||
97 | /* to make sure it doesn't hog all of the bandwidth */ | ||
98 | #define DEPTH_INTERVAL 5 | ||
99 | |||
100 | #include "uhci-debug.c" | 91 | #include "uhci-debug.c" |
101 | #include "uhci-q.c" | 92 | #include "uhci-q.c" |
102 | #include "uhci-hub.c" | 93 | #include "uhci-hub.c" |
@@ -255,6 +246,7 @@ __acquires(uhci->lock) | |||
255 | uhci_to_hcd(uhci)->poll_rh = !int_enable; | 246 | uhci_to_hcd(uhci)->poll_rh = !int_enable; |
256 | 247 | ||
257 | uhci_scan_schedule(uhci, NULL); | 248 | uhci_scan_schedule(uhci, NULL); |
249 | uhci_fsbr_off(uhci); | ||
258 | } | 250 | } |
259 | 251 | ||
260 | static void start_rh(struct uhci_hcd *uhci) | 252 | static void start_rh(struct uhci_hcd *uhci) |
@@ -487,9 +479,6 @@ static int uhci_start(struct usb_hcd *hcd) | |||
487 | 479 | ||
488 | hcd->uses_new_polling = 1; | 480 | hcd->uses_new_polling = 1; |
489 | 481 | ||
490 | uhci->fsbr = 0; | ||
491 | uhci->fsbrtimeout = 0; | ||
492 | |||
493 | spin_lock_init(&uhci->lock); | 482 | spin_lock_init(&uhci->lock); |
494 | 483 | ||
495 | INIT_LIST_HEAD(&uhci->idle_qh_list); | 484 | INIT_LIST_HEAD(&uhci->idle_qh_list); |