diff options
author | Simon Glass <sjg@chromium.org> | 2011-06-29 15:34:58 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:43 -0700 |
commit | 8cd6678e31c19c291e643ea5cc699bf4974f1938 (patch) | |
tree | 63f99317141a6bb7887aeda19f62cb1231545c43 /drivers/usb/host/ehci-hcd.c | |
parent | a68cdfe396cb533228d218bc2e0e1731482d69a1 (diff) |
Handle USB timeouts better
After discussions on the U-Boot Mailing List it seems that this patch
improves the ASIX network driver timeout issue.
This is an interim fix since there is not time to look at it in detail now.
BUG=chromium-os:17147
TEST=network boot and observe that timeouts seems less common
(however, they still occur)
Change-Id: I5847c04abbd2d15382df6ef45fe21214e13d1b60
Reviewed-on: http://gerrit.chromium.org/gerrit/3409
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 9647ef48526..319c0d12f91 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -486,17 +486,17 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer, WATCHDOG_RESET(); } while (get_timer(ts) < timeout); + /* Disable async schedule. */ + cmd = ehci_readl(&hcor->or_usbcmd); + cmd &= ~CMD_ASE; + ehci_writel(&hcor->or_usbcmd, cmd); + /* Check that the TD processing happened */ if (token & 0x80) { printf("EHCI timed out on TD - token=%#x\n", token); goto fail; } - /* Disable async schedule. */ - cmd = ehci_readl(&hcor->or_usbcmd); - cmd &= ~CMD_ASE; - ehci_writel(&hcor->or_usbcmd, cmd); - ret = handshake((uint32_t *)&hcor->or_usbsts, STD_ASS, 0, 100 * 1000); if (ret < 0) { |