diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2013-09-12 18:23:09 -0700 |
---|---|---|
committer | Isaac Christensen <isaac.christensen@se-eng.com> | 2014-08-14 21:17:30 +0200 |
commit | df6d09d0fb319f5c834b75babad62a0221582fce (patch) | |
tree | f6f8bff1931f7293d2c14caa69969a4c1b983118 /payloads/libpayload | |
parent | 7ecc912b32f3fa1f94c1aadaba275ddb3d5efac5 (diff) |
libpayload: Reduce media init timeout to 5 seconds.
Currently, we wait for up to 30 seconds for a device to become ready to
respond to a TEST_UNIT_READY command. In practice, all media devices become
ready much sooner. But, certain devices do not function with libpayload's
USB driver, and always timeout. To provide a better user experience when
booting with such devices, reduce the timeout to 5 seconds.
Change-Id: Icceab99fa266cdf441847627087eaa5de9b88ecc
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/169209
(cherry picked from commit 9e55204e92adca0476d273565683f211d6803e7a)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6647
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r-- | payloads/libpayload/drivers/usb/usbmsc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/usbmsc.c b/payloads/libpayload/drivers/usb/usbmsc.c index f68bee5bd3..1f8c551100 100644 --- a/payloads/libpayload/drivers/usb/usbmsc.c +++ b/payloads/libpayload/drivers/usb/usbmsc.c @@ -539,8 +539,10 @@ usb_msc_test_unit_ready (usbdev_t *dev) int i; time_t start_time_secs; struct timeval tv; - /* SCSI/ATA specs say we have to wait up to 30s. Ugh */ - const int timeout_secs = 30; + /* SCSI/ATA specs say we have to wait up to 30s, but most devices + * are ready much sooner. Use a 5 sec timeout to better accomodate + * devices which fail to respond. */ + const int timeout_secs = 5; usb_debug (" Waiting for device to become ready..."); |