diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-06-14 12:25:17 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-06-14 12:25:17 -0400 |
commit | 88fa2273e85d569a64de8d9c4290915f59b04bd3 (patch) | |
tree | 30a98d5f840d09fa45047f3f9cfa59b0aa4877b1 /src/hw/usb.h | |
parent | ffc06871281830ac0b2ec9fe6a2cb5403bf72503 (diff) | |
download | seabios-88fa2273e85d569a64de8d9c4290915f59b04bd3.tar.gz |
xhci: Update the times for usb command timeouts.
The xhci controller had a hardcoded 1 second timeout for both bulk and
control transfers. The 1 second bulk timeout is too small for some
real devices.
Increase both times to 5.1 seconds - according to the USB spec, the
maximum time a command should take is 5 seconds. However, have the
set_address command only wait for 150ms (spec says set_address should
take no more than 50ms).
Introduce usb_xfer_time() to calculate maximum command time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/usb.h')
-rw-r--r-- | src/hw/usb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hw/usb.h b/src/hw/usb.h index 61962964..3a663ce1 100644 --- a/src/hw/usb.h +++ b/src/hw/usb.h @@ -84,6 +84,10 @@ struct usbhub_op_s { #define USB_TIME_DRSTR 50 #define USB_TIME_RSTRCY 10 +#define USB_TIME_STATUS 50 +#define USB_TIME_DATAIN 500 +#define USB_TIME_COMMAND 5000 + #define USB_TIME_SETADDR_RECOVERY 2 #define USB_PID_OUT 0xe1 @@ -237,6 +241,7 @@ void usb_desc2pipe(struct usb_pipe *pipe, struct usbdevice_s *usbdev , struct usb_endpoint_descriptor *epdesc); int usb_getFrameExp(struct usbdevice_s *usbdev , struct usb_endpoint_descriptor *epdesc); +int usb_xfer_time(struct usb_pipe *pipe, int datalen); struct usb_endpoint_descriptor *findEndPointDesc(struct usbdevice_s *usbdev , int type, int dir); void usb_enumerate(struct usbhub_s *hub); |