svn commit: r272092 - stable/9/sys/dev/usb/controller

Hans Petter Selasky hselasky at FreeBSD.org
Thu Sep 25 05:59:13 UTC 2014


Author: hselasky
Date: Thu Sep 25 05:59:12 2014
New Revision: 272092
URL: http://svnweb.freebsd.org/changeset/base/272092

Log:
  MFC r271953:
  Some XHCI hardware requires dropping the endpoint context before
  adding it again.

Modified:
  stable/9/sys/dev/usb/controller/xhci.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/9/sys/dev/usb/controller/xhci.c	Thu Sep 25 05:47:33 2014	(r272091)
+++ stable/9/sys/dev/usb/controller/xhci.c	Thu Sep 25 05:59:12 2014	(r272092)
@@ -2217,7 +2217,14 @@ xhci_configure_mask(struct usb_device *u
 		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 */


More information about the svn-src-all mailing list