From owner-svn-src-stable-9@FreeBSD.ORG Sat Jul 19 19:57:27 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABC4ABCC; Sat, 19 Jul 2014 19:57:27 +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 982E4293C; Sat, 19 Jul 2014 19:57:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6JJvRQe043408; Sat, 19 Jul 2014 19:57:27 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6JJvRbs043406; Sat, 19 Jul 2014 19:57:27 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407191957.s6JJvRbs043406@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 19 Jul 2014 19:57:27 +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: r268885 - 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-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2014 19:57:27 -0000 Author: hselasky Date: Sat Jul 19 19:57:27 2014 New Revision: 268885 URL: http://svnweb.freebsd.org/changeset/base/268885 Log: MFC r268735: Improve support for Intel Lynx Point USB 3.0 controllers by using the USB 2.0 port mask in addition to the USB 3.0 port mask. The hardware does not always accept when writing -1U to the port switching registers. Modified: stable/9/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Sat Jul 19 19:56:23 2014 (r268884) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Sat Jul 19 19:57:27 2014 (r268885) @@ -140,6 +140,8 @@ static int xhci_pci_port_route(device_t self, uint32_t set, uint32_t clear) { uint32_t temp; + uint32_t usb3_mask; + uint32_t usb2_mask; temp = pci_read_config(self, PCI_XHCI_INTEL_USB3_PSSEN, 4) | pci_read_config(self, PCI_XHCI_INTEL_XUSB2PR, 4); @@ -148,10 +150,11 @@ xhci_pci_port_route(device_t self, uint3 temp &= ~clear; /* Don't set bits which the hardware doesn't support */ - temp &= pci_read_config(self, PCI_XHCI_INTEL_USB3PRM, 4); + usb3_mask = pci_read_config(self, PCI_XHCI_INTEL_USB3PRM, 4); + usb2_mask = pci_read_config(self, PCI_XHCI_INTEL_USB2PRM, 4); - pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, temp, 4); - pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, temp, 4); + pci_write_config(self, PCI_XHCI_INTEL_USB3_PSSEN, temp & usb3_mask, 4); + pci_write_config(self, PCI_XHCI_INTEL_XUSB2PR, temp & usb2_mask, 4); device_printf(self, "Port routing mask set to 0x%08x\n", temp);