summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhci.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2004-08-11 04:21:45 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2004-08-11 04:21:45 +0000
commit07eee5c2a6e5952d49c2dc6530ae9abd3a1690cd (patch)
treed637273149c2cf635a6973703382359b4dcf46e9 /sys/dev/usb/uhci.c
parent240de1bd24604969a565fffab19cac746055b1d7 (diff)
from netbsd, uhci.c revision 1.176
Ignore a CRCTO error on a SETUP transaction in combination with STALLED or NAK. This fixes problems with the GL641.
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r--sys/dev/usb/uhci.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 5cca24f927a..2aed4158471 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.32 2004/07/11 05:29:16 deraadt Exp $ */
+/* $OpenBSD: uhci.c,v 1.33 2004/08/11 04:21:44 dlg Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -1426,8 +1426,17 @@ uhci_idone(uhci_intr_info_t *ii)
status = nstatus;
if (UHCI_TD_GET_PID(le32toh(std->td.td_token)) !=
- UHCI_TD_PID_SETUP)
+ UHCI_TD_PID_SETUP)
actlen += UHCI_TD_GET_ACTLEN(status);
+ else {
+ /*
+ * UHCI will report CRCTO in addition to a STALL or NAK
+ * for a SETUP transaction. See section 3.2.2, "TD
+ * CONTROL AND STATUS".
+ */
+ if (status & (UHCI_TD_STALLED | UHCI_TD_NAK))
+ status &= ~UHCI_TD_CRCTO;
+ }
}
/* If there are left over TDs we need to update the toggle. */
if (std != NULL)