The SeaBIOS USB drivers all have different timeouts for USB commands. The USB specification does specify maximum command times (section 9.2.6). In particular, it states that all commands are expected to complete within 5 seconds.
This series unifies the command timeouts across the drivers. Generally, the timeout is increased to 5 seconds for all commands. This fixes an issue reported by some users of USB flash drives on XHCI controllers (the xhci controller had a 1 second bulk timeout).
The control command timeouts are also increased to 5 seconds except for the set_address command. This is reduced to 150ms (spec caps device to 50ms) to prevent 5 second hangs should a port report a device that isn't actually there. Once the driver starts talking to a device it would be very unusual to timeout on a command, so there shouldn't be any problem with a limit of five seconds.
-Kevin
Kevin O'Connor (4): xhci: Update the times for usb command timeouts. ehci: Update usb command timeouts to use usb_xfer_time() uhci: Update usb command timeouts to use usb_xfer_time() ohci: Update usb command timeouts to use usb_xfer_time()
src/hw/usb-ehci.c | 11 ++++++----- src/hw/usb-ohci.c | 7 +++---- src/hw/usb-uhci.c | 13 ++++++------- src/hw/usb-xhci.c | 4 ++-- src/hw/usb.c | 13 +++++++++++++ src/hw/usb.h | 5 +++++ 6 files changed, 35 insertions(+), 18 deletions(-)