From owner-svn-src-stable@FreeBSD.ORG Thu Sep 25 05:59:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1CD5180; Thu, 25 Sep 2014 05:59:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBAAF66C; Thu, 25 Sep 2014 05:59:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8P5xDur054116; Thu, 25 Sep 2014 05:59:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8P5xDWW054115; Thu, 25 Sep 2014 05:59:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409250559.s8P5xDWW054115@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Sep 2014 05:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272092 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2014 05:59:13 -0000 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 */