summaryrefslogtreecommitdiffstats
path: root/src/drivers/usb
diff options
context:
space:
mode:
authorMichael Brown2015-03-18 17:43:18 +0100
committerMichael Brown2015-03-18 17:43:18 +0100
commitacc27b9005fcef1f51c0dd7226faa5c101aa96df (patch)
tree9c1c577cd3f6f040deb062b5cf4fba1b34f9ca1c /src/drivers/usb
parent[netdevice] Add missing bus types to netdev_fetch_bustype() (diff)
downloadipxe-acc27b9005fcef1f51c0dd7226faa5c101aa96df.tar.gz
ipxe-acc27b9005fcef1f51c0dd7226faa5c101aa96df.tar.xz
ipxe-acc27b9005fcef1f51c0dd7226faa5c101aa96df.zip
[usb] Fix USB timeouts to match specification
Several of the USB timeouts were chosen on the principle of "pick an arbitrary but ridiculously large value, just to be safe". It turns out that some of the timeouts permitted by the USB specification are even larger: for example, control transactions are allowed to take up to five seconds to complete. Fix up these USB timeout values to match those found in the USB2 specification. Debugged-by: Robin Smidsrød <robin@smidsrod.no> Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/usb')
-rw-r--r--src/drivers/usb/xhci.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/usb/xhci.h b/src/drivers/usb/xhci.h
index 30320807..5abb5caa 100644
--- a/src/drivers/usb/xhci.h
+++ b/src/drivers/usb/xhci.h
@@ -991,9 +991,11 @@ xhci_ring_consumed ( struct xhci_trb_ring *ring ) {
/** Maximum time to wait for a command to complete
*
- * This is a policy decision.
+ * The "address device" command involves waiting for a response to a
+ * USB control transaction, and so we must wait for up to the 5000ms
+ * that USB allows for devices to respond to control transactions.
*/
-#define XHCI_COMMAND_MAX_WAIT_MS 500
+#define XHCI_COMMAND_MAX_WAIT_MS USB_CONTROL_MAX_WAIT_MS
/** Time to delay after aborting a command
*