diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2015-11-09 12:00:52 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-11-17 09:19:18 -0500 |
commit | 45b594ab1d0d05903482e818e7c6b2c81b850e54 (patch) | |
tree | 03db0cb3ed00a7e6566ba4b56dad5c336baee7cc /src/hw/usb.c | |
parent | 01a84bea2d28a19d2405c1ecac4bdef17683cc0c (diff) | |
download | seabios-45b594ab1d0d05903482e818e7c6b2c81b850e54.tar.gz |
usb: Allow configuration of sigatt time (in etc/usb-time-sigatt)
Several users have reported devices that take more than 100ms to
announce their presence on a USB port. Allow the sigatt timeout to be
specified at runtime as a way to extend the default timeout.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/usb.c')
-rw-r--r-- | src/hw/usb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hw/usb.c b/src/hw/usb.c index e46092c6..2bffd250 100644 --- a/src/hw/usb.c +++ b/src/hw/usb.c @@ -8,6 +8,7 @@ #include "config.h" // CONFIG_* #include "malloc.h" // free #include "output.h" // dprintf +#include "romfile.h" // romfile_loadint #include "string.h" // memset #include "usb.h" // struct usb_s #include "usb-ehci.h" // ehci_setup @@ -455,12 +456,14 @@ resetfail: goto done; } +u32 usb_time_sigatt; + void usb_enumerate(struct usbhub_s *hub) { u32 portcount = hub->portcount; hub->threads = portcount; - hub->detectend = timer_calc(USB_TIME_SIGATT); + hub->detectend = timer_calc(usb_time_sigatt); // Launch a thread for every port. int i; @@ -497,5 +500,6 @@ usb_setup(void) ASSERT32FLAT(); if (! CONFIG_USB) return; + usb_time_sigatt = romfile_loadint("etc/usb-time-sigatt", USB_TIME_SIGATT); run_thread(__usb_setup, NULL); } |