diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-06-05 12:28:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 18:04:16 -0400 |
commit | c5e3b741a3fec6077a480aa65ded29d79ded8898 (patch) | |
tree | 13d5bf2fe7d2cc14500bafbb2c804da2ed23b102 /drivers/usb/host/uhci-hcd.h | |
parent | e323de46e83b6df2f330651907ac823f8d53308a (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.h')
-rw-r--r-- | drivers/usb/host/uhci-hcd.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h index 619d704f4e8f..108e3de2dc26 100644 --- a/drivers/usb/host/uhci-hcd.h +++ b/drivers/usb/host/uhci-hcd.h | |||
@@ -86,7 +86,7 @@ | |||
86 | 86 | ||
87 | /* When no queues need Full-Speed Bandwidth Reclamation, | 87 | /* When no queues need Full-Speed Bandwidth Reclamation, |
88 | * delay this long before turning FSBR off */ | 88 | * delay this long before turning FSBR off */ |
89 | #define FSBR_OFF_DELAY msecs_to_jiffies(400) | 89 | #define FSBR_OFF_DELAY msecs_to_jiffies(10) |
90 | 90 | ||
91 | /* If a queue hasn't advanced after this much time, assume it is stuck */ | 91 | /* If a queue hasn't advanced after this much time, assume it is stuck */ |
92 | #define QH_WAIT_TIMEOUT msecs_to_jiffies(200) | 92 | #define QH_WAIT_TIMEOUT msecs_to_jiffies(200) |
@@ -382,8 +382,6 @@ struct uhci_hcd { | |||
382 | __le32 *frame; | 382 | __le32 *frame; |
383 | void **frame_cpu; /* CPU's frame list */ | 383 | void **frame_cpu; /* CPU's frame list */ |
384 | 384 | ||
385 | unsigned long fsbr_jiffies; /* Time when FSBR was last wanted */ | ||
386 | |||
387 | enum uhci_rh_state rh_state; | 385 | enum uhci_rh_state rh_state; |
388 | unsigned long auto_stop_time; /* When to AUTO_STOP */ | 386 | unsigned long auto_stop_time; /* When to AUTO_STOP */ |
389 | 387 | ||
@@ -400,6 +398,10 @@ struct uhci_hcd { | |||
400 | need to be polled */ | 398 | need to be polled */ |
401 | unsigned int is_initialized:1; /* Data structure is usable */ | 399 | unsigned int is_initialized:1; /* Data structure is usable */ |
402 | unsigned int fsbr_is_on:1; /* FSBR is turned on */ | 400 | unsigned int fsbr_is_on:1; /* FSBR is turned on */ |
401 | unsigned int fsbr_is_wanted:1; /* Does any URB want FSBR? */ | ||
402 | unsigned int fsbr_expiring:1; /* FSBR is timing out */ | ||
403 | |||
404 | struct timer_list fsbr_timer; /* For turning off FBSR */ | ||
403 | 405 | ||
404 | /* Support for port suspend/resume/reset */ | 406 | /* Support for port suspend/resume/reset */ |
405 | unsigned long port_c_suspend; /* Bit-arrays of ports */ | 407 | unsigned long port_c_suspend; /* Bit-arrays of ports */ |