summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>2003-11-04 19:11:21 +0000
committermycroft <mycroft@NetBSD.org>2003-11-04 19:11:21 +0000
commitc6589d208206a103ec8df4e085c2b07fbde49122 (patch)
tree68eb6eeee49142ee7e93cf310d953fadcd0c9278 /sys/dev
parent73fea8467b1b9333504a57cc4ba91161b48adb1c (diff)
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')
-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 162bd62b561..1b2c57af821 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.175 2003/09/12 16:18:08 mycroft Exp $ */
+/* $NetBSD: uhci.c,v 1.176 2003/11/04 19:11:21 mycroft Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
/*
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.175 2003/09/12 16:18:08 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.176 2003/11/04 19:11:21 mycroft Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1427,6 +1427,15 @@ uhci_idone(uhci_intr_info_t *ii)
if (UHCI_TD_GET_PID(le32toh(std->td.td_token)) !=
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)