diff options
author | Rosen Kolev <rosen.kolev@amk-drives.bg> | 2011-09-21 17:58:36 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-09-23 08:53:21 +0200 |
commit | 98e43c5b30f67c60476228225e8cf4d5c12bf021 (patch) | |
tree | 604a0790afa1086b945feaa37d9700ab15ff2ccf /drivers/usb/host | |
parent | 0972e837c3631c4fbbf16080c76ebad0c94086d7 (diff) | |
download | barebox-98e43c5b30f67c60476228225e8cf4d5c12bf021.tar.gz barebox-98e43c5b30f67c60476228225e8cf4d5c12bf021.tar.xz |
Modified timeout in the ehci-hcd USB host driver.
Increased the asynchronous message timeout for bulk endpoints.
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 81e41d938e..7cfa4530b4 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -298,7 +298,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer, uint32_t c, toggle; uint32_t cmd; int ret = 0; - uint64_t start; + uint64_t start, timeout_val; static struct QH __qh __attribute__((aligned(32))); static struct qTD __td[3] __attribute__((aligned(32))); @@ -415,13 +415,14 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer, } /* Wait for TDs to be processed. */ + timeout_val = usb_pipebulk(pipe) ? (SECOND << 2) : (SECOND >> 2); start = get_time_ns(); vtd = td; do { /* Invalidate dcache */ ehci_invalidate_dcache(ehci->qh_list); token = hc32_to_cpu(vtd->qt_token); - if (is_timeout(start, SECOND >> 2)) { + if (is_timeout(start, timeout_val)) { /* Disable async schedule. */ cmd = ehci_readl(&ehci->hcor->or_usbcmd); cmd &= ~CMD_ASE; |