mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 13:11:11 +03:00
[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>
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user