From owner-svn-src-head@FreeBSD.ORG Sat Jan 11 08:10:01 2014 Return-Path: Delivered-To: svn-src-head@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 CC99533F; Sat, 11 Jan 2014 08:10:01 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B85C41C92; Sat, 11 Jan 2014 08:10:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0B8A176043152; Sat, 11 Jan 2014 08:10:01 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0B8A1kI043150; Sat, 11 Jan 2014 08:10:01 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401110810.s0B8A1kI043150@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 11 Jan 2014 08:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260535 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jan 2014 08:10:01 -0000 Author: hselasky Date: Sat Jan 11 08:10:01 2014 New Revision: 260535 URL: http://svnweb.freebsd.org/changeset/base/260535 Log: Force clearing of event ring interrupts. The "Intel Lynx Point" XHCI controller found in the MBP2013 has been observed to not work properly unless this operation is performed. MFC after: 1 week Tested by: Huang Wen Hui Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Sat Jan 11 07:53:03 2014 (r260534) +++ head/sys/dev/usb/controller/xhci.c Sat Jan 11 08:10:01 2014 (r260535) @@ -1578,6 +1578,7 @@ void xhci_interrupt(struct xhci_softc *sc) { uint32_t status; + uint32_t temp; USB_BUS_LOCK(&sc->sc_bus); @@ -1588,6 +1589,12 @@ xhci_interrupt(struct xhci_softc *sc) XWRITE4(sc, oper, XHCI_USBSTS, status); DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + + temp = XREAD4(sc, runt, XHCI_IMAN(0)); + + /* force clearing of pending interrupts */ + if (temp & XHCI_IMAN_INTR_PEND) + XWRITE4(sc, runt, XHCI_IMAN(0), temp); /* check for event(s) */ xhci_interrupt_poll(sc);