summaryrefslogtreecommitdiff
path: root/drivers/usb/host/uhci-hcd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-06-05 12:28:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 15:04:16 -0700
commitc5e3b741a3fec6077a480aa65ded29d79ded8898 (patch)
tree13d5bf2fe7d2cc14500bafbb2c804da2ed23b102 /drivers/usb/host/uhci-hcd.c
parente323de46e83b6df2f330651907ac823f8d53308a (diff)
[PATCH] UHCI: Improve FSBR-off timing
This patch (as707) improves the FSBR operation in uhci-hcd by turning it off more quickly when it isn't needed. FSBR puts a noticeable load on a computer's PCI bus, so it should be disabled as soon as possible when it isn't in use. The patch leaves it running for only 10 ms after the last URB stops using it, on the theory that this should be long enough for a driver to submit another URB if it wants keep FSBR going. 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 025b969f95e8..7b48567622ef 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -497,9 +497,9 @@ static int uhci_start(struct usb_hcd *hcd)
hcd->uses_new_polling = 1;
spin_lock_init(&uhci->lock);
-
+ setup_timer(&uhci->fsbr_timer, uhci_fsbr_timeout,
+ (unsigned long) uhci);
INIT_LIST_HEAD(&uhci->idle_qh_list);
-
init_waitqueue_head(&uhci->waitqh);
if (DEBUG_CONFIGURED) {
@@ -675,6 +675,7 @@ static void uhci_stop(struct usb_hcd *hcd)
uhci_scan_schedule(uhci, NULL);
spin_unlock_irq(&uhci->lock);
+ del_timer_sync(&uhci->fsbr_timer);
release_uhci(uhci);
}