summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2014-10-05 12:46:58 +0000
committermpi <mpi@openbsd.org>2014-10-05 12:46:58 +0000
commit2635132f0eb7d9ff97dbf8ed5ea2d7ba107b91ef (patch)
tree1b4b31fe20c733af286f241b18f8c436b78abf55
parentSkip unnecessary processing in interrupt handler. (diff)
downloadwireguard-openbsd-2635132f0eb7d9ff97dbf8ed5ea2d7ba107b91ef.tar.xz
wireguard-openbsd-2635132f0eb7d9ff97dbf8ed5ea2d7ba107b91ef.zip
Do not mark the pipe as halted when the HC reports a (split) transaction
error. Makes Intel Series 7 controllers happy and no longer report an illegal context state transition when detaching devices.
-rw-r--r--sys/dev/usb/xhci.c6
-rw-r--r--sys/dev/usb/xhcireg.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index fc7f6f9542c..7394fe44cba 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xhci.c,v 1.26 2014/10/04 13:07:22 mpi Exp $ */
+/* $OpenBSD: xhci.c,v 1.27 2014/10/05 12:46:58 mpi Exp $ */
/*
* Copyright (c) 2014 Martin Pieuchot
@@ -708,6 +708,10 @@ xhci_event_xfer(struct xhci_softc *sc, uint64_t paddr, uint32_t status,
if (xx->index != trb_idx)
return;
break;
+ case XHCI_CODE_TXERR:
+ case XHCI_CODE_SPLITERR:
+ xfer->status = USBD_IOERROR;
+ break;
case XHCI_CODE_STALL:
/* XXX We need to report this condition for umass(4). */
xfer->status = USBD_STALLED;
diff --git a/sys/dev/usb/xhcireg.h b/sys/dev/usb/xhcireg.h
index 2c3987031e4..0eb2f0af841 100644
--- a/sys/dev/usb/xhcireg.h
+++ b/sys/dev/usb/xhcireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xhcireg.h,v 1.3 2014/08/08 14:28:02 mpi Exp $ */
+/* $OpenBSD: xhcireg.h,v 1.4 2014/10/05 12:46:58 mpi Exp $ */
/*-
* Copyright (c) 2014 Martin Pieuchot. All rights reserved.
@@ -430,6 +430,6 @@ struct xhci_trb {
#define XHCI_CODE_UNDEFINED 33 /* Fatal error - impl. specific */
#define XHCI_CODE_INVALID_SID 34 /* Invalid stream ID received */
#define XHCI_CODE_SEC_BW 35 /* Cannot alloc secondary BW Domain */
-#define XHCI_CODE_SPLIT_XACT 36 /* USB2 split transaction */
+#define XHCI_CODE_SPLITERR 36 /* USB2 split transaction */
#endif /* _XHCIREG_H_ */