From 7b7b5666f0d286989402c2372cafb4e02e130dae Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Tue, 29 May 2012 16:19:19 +0200 Subject: libpayload: fix UHCI timeout UHCI commands should have a timeout of 30ms, not 30s! Change-Id: Iebcf338317164eb1e683e1de850ffab5022ca3a1 Signed-off-by: Mathias Krause Reviewed-on: http://review.coreboot.org/1085 Reviewed-by: Mathias Krause Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- payloads/libpayload/drivers/usb/uhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'payloads/libpayload') diff --git a/payloads/libpayload/drivers/usb/uhci.c b/payloads/libpayload/drivers/usb/uhci.c index d9a1a10624..8f2321eedf 100644 --- a/payloads/libpayload/drivers/usb/uhci.c +++ b/payloads/libpayload/drivers/usb/uhci.c @@ -262,12 +262,12 @@ uhci_stop (hci_t *controller) static td_t * wait_for_completed_qh (hci_t *controller, qh_t *qh) { - int timeout = 1000000; /* max 30 ms. */ + int timeout = 1000; /* max 30 ms. */ void *current = GET_TD (qh->elementlinkptr); while (((qh->elementlinkptr & FLISTP_TERMINATE) == 0) && (timeout-- > 0)) { if (current != GET_TD (qh->elementlinkptr)) { current = GET_TD (qh->elementlinkptr); - timeout = 1000000; + timeout = 1000; } uhci_reg_write16(controller, USBSTS, uhci_reg_read16(controller, USBSTS) | 0); // clear resettable registers -- cgit v1.2.3