[coreboot-gerrit] Patch set updated for coreboot: a73980e libpayload: Increase USB EHCI transfer timeout

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Fri Dec 20 23:32:04 CET 2013


Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4379

-gerrit

commit a73980e329dbc1c8b8335f3f14e33cdc665fb699
Author: Julius Werner <jwerner at chromium.org>
Date:   Tue Jul 23 12:45:18 2013 -0700

    libpayload: Increase USB EHCI transfer timeout
    
    The EHCI driver defines a maximum transfer timeout of two seconds. The
    comments state that during tests the maximum amount of required transfer
    time was for the SCSI TEST_UNIT_READY command on certain devices. We
    have now observed a USB device (Patriot Memory 13fe:3100) that can NAK
    this command for slightly more than two seconds. It will also completely
    fail if the timeout hits, since it gets confused by the subsequent CSW
    retry/recovery mechanism and starts producing babble errors. This patch
    increases the timeout to three seconds to circumvent this problem.
    
    To test, boot a Falco from a red-black RageXT USB stick.
    
    Change-Id: I3c4fef468fb16eacc5a487d76d025a78fb450e27
    Signed-off-by: Julius Werner <jwerner at chromium.org>
    Reviewed-on: https://gerrit.chromium.org/gerrit/63095
    Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Reviewed-by: Duncan Laurie <dlaurie at chromium.org>
    Reviewed-by: Sameer Nanda <snanda at chromium.org>
---
 payloads/libpayload/drivers/usb/ehci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c
index e61e806..e58bd38 100644
--- a/payloads/libpayload/drivers/usb/ehci.c
+++ b/payloads/libpayload/drivers/usb/ehci.c
@@ -279,12 +279,12 @@ static int wait_for_tds(qtd_t *head)
 		/* how long to wait?
 		 * tested with some USB2.0 flash sticks:
 		 * TUR turn around took
-		 *   about 2s for the slowest (14cd:121c)
+		 *   about 2.2s for the slowest (13fe:3800)
 		 *   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
+		 * set to 3s to be safe as a failed TUR can be fatal
 		 */
-		int timeout = 40000; /* time out after 40000 * 50us == 2s */
+		int timeout = 60000; /* time out after 60000 * 50us == 3s */
 		while ((cur->token & QTD_ACTIVE) && !(cur->token & QTD_HALTED)
 				&& timeout--)
 			udelay(50);



More information about the coreboot-gerrit mailing list