From 98348e101f73fcf084e8c65d3602449e7be07f42 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Sun, 5 Oct 2014 12:46:59 +0000 Subject: 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. --- sys/dev/usb/xhci.c | 6 +++++- sys/dev/usb/xhcireg.h | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'sys/dev') 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_ */ -- cgit v1.2.3