summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2014-09-25 07:37:41 +0000
committerhselasky <hselasky@FreeBSD.org>2014-09-25 07:37:41 +0000
commitfd7a3a7bfd6de88f8c1a5d2d22027bbbf6df4385 (patch)
treea4ccde712b09925226ce1fa64cff9ec02fa87b21
parente2c082688a770176d714a5ead716c496efd828ff (diff)
downloadFreeBSD-src-fd7a3a7bfd6de88f8c1a5d2d22027bbbf6df4385.zip
FreeBSD-src-fd7a3a7bfd6de88f8c1a5d2d22027bbbf6df4385.tar.gz
MFC r271953:
Some XHCI hardware requires dropping the endpoint context before adding it again. Approved by: re, glebius
-rw-r--r--sys/dev/usb/controller/xhci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
index 2b0ad00..6a4d894 100644
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -2252,7 +2252,14 @@ xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop)
xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, mask);
xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, 0);
} else {
- xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, 0);
+ /*
+ * Some hardware requires that we drop the endpoint
+ * context before adding it again:
+ */
+ xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0,
+ mask & XHCI_INCTX_NON_CTRL_MASK);
+
+ /* Add new endpoint context */
xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, mask);
/* find most significant set bit */
OpenPOWER on IntegriCloud