Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2014 07:37:42 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r272097 - stable/10/sys/dev/usb/controller
Message-ID:  <201409250737.s8P7bgHR001212@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu Sep 25 07:37:41 2014
New Revision: 272097
URL: http://svnweb.freebsd.org/changeset/base/272097

Log:
  MFC r271953:
  Some XHCI hardware requires dropping the endpoint context before
  adding it again.
  
  Approved by:	re, glebius

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

Modified: stable/10/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/10/sys/dev/usb/controller/xhci.c	Thu Sep 25 07:22:24 2014	(r272096)
+++ stable/10/sys/dev/usb/controller/xhci.c	Thu Sep 25 07:37:41 2014	(r272097)
@@ -2252,7 +2252,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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409250737.s8P7bgHR001212>