diff options
author | Nico Huber <nico.huber@secunet.com> | 2012-06-01 08:54:29 +0200 |
---|---|---|
committer | Nico Huber <nico.huber@secunet.com> | 2012-06-21 11:52:33 +0200 |
commit | cef86927e846409f7c4018d6c1f9ad1d89b9269b (patch) | |
tree | ba6d8f62991f5a2b32a84de902dd2b47c451bf6d | |
parent | dab6bfe97d3588b73f7a3f7b9411cfa0e221f916 (diff) |
libpayload: Adjust timeout in EHCI driver
Tested with a bunch of usb flash sticks. The slowest non-TUR (test
unit ready) turn around took about 1.3s, so this commit increases the
timeout to 2s.
Change-Id: Iec64b5cc48d51912b2bdeeebb5885399a71311b2
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/1120
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r-- | payloads/libpayload/drivers/usb/ehci.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c index 1cb1535978..27e160b473 100644 --- a/payloads/libpayload/drivers/usb/ehci.c +++ b/payloads/libpayload/drivers/usb/ehci.c @@ -169,11 +169,15 @@ static int wait_for_tds(qtd_t *head) if (0) dump_td(virt_to_phys(cur)); /* wait for results */ - /* TOTEST: how long to wait? - * tested with some USB2.0 flash sticks: - * slowest took around 180ms + /* how long to wait? + * tested with some USB2.0 flash sticks: + * TUR turn around took + * about 2s for the slowest (14cd:121c) + * max. 250ms for the others + * slowest non-TUR turn around took about 1.3s + * try 2s for now as a failed TUR is not fatal */ - int timeout = 10000; /* time out after 10000 * 50us == 500ms */ + int timeout = 40000; /* time out after 40000 * 50us == 2s */ while ((cur->token & QTD_ACTIVE) && !(cur->token & QTD_HALTED) && timeout--) udelay(50); |