summaryrefslogtreecommitdiffstats
path: root/include/usb.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-02-07 14:42:16 -0800
committerRemy Bohmer <linux@bohmer.net>2011-02-19 20:32:34 +0100
commit96820a35873b4c005f732432c6a168decc9d22b9 (patch)
tree181c14ab100fc6075409b23b43b00b363dacdc4e /include/usb.h
parentefb063390d2d1e712c2c8110911616244d562c4b (diff)
downloadu-boot-96820a35873b4c005f732432c6a168decc9d22b9.tar.gz
u-boot-96820a35873b4c005f732432c6a168decc9d22b9.tar.xz
u-boot-96820a35873b4c005f732432c6a168decc9d22b9.zip
Fix EHCI usb submit timeout and unify with OHCI
Changed both to use a common timeout for URB submission, since they were using different values and EHCI's was too short. Also fixed EHCI to actually check if urb submission succeeded, rather than silently continuing into the weeds. Change-Id: I7f71499ffaa05187d8e5618db2419e1606007b82 Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/usb.h b/include/usb.h
index afd65e3180..98576b73a4 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -42,6 +42,12 @@
#define USB_CNTL_TIMEOUT 100 /* 100ms timeout */
+/*
+ * This is the timeout to allow for submitting an urb in ms. We allow more
+ * time for a BULK device to react - some are slow.
+ */
+#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 100)
+
/* device request (setup) */
struct devrequest {
unsigned char requesttype;