Date: Fri, 24 Jan 2014 07:24:41 +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: r261096 - stable/10/sys/dev/usb/controller Message-ID: <201401240724.s0O7Of2E002916@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Fri Jan 24 07:24:40 2014 New Revision: 261096 URL: http://svnweb.freebsd.org/changeset/base/261096 Log: MFC r260388, r260535 and r260536: Fix XHCI interrupt logic for "Intel Lynx Point" found in MBP2013. 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 Fri Jan 24 02:57:00 2014 (r261095) +++ stable/10/sys/dev/usb/controller/xhci.c Fri Jan 24 07:24:40 2014 (r261096) @@ -1578,23 +1578,26 @@ void xhci_interrupt(struct xhci_softc *sc) { uint32_t status; + uint32_t temp; USB_BUS_LOCK(&sc->sc_bus); status = XREAD4(sc, oper, XHCI_USBSTS); - if (status == 0) - goto done; - /* acknowledge interrupts */ + /* acknowledge interrupts, if any */ + if (status != 0) { + XWRITE4(sc, oper, XHCI_USBSTS, status); + DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + } - XWRITE4(sc, oper, XHCI_USBSTS, status); + temp = XREAD4(sc, runt, XHCI_IMAN(0)); - DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); + /* force clearing of pending interrupts */ + if (temp & XHCI_IMAN_INTR_PEND) + XWRITE4(sc, runt, XHCI_IMAN(0), temp); - if (status & XHCI_STS_EINT) { - /* check for event(s) */ - xhci_interrupt_poll(sc); - } + /* check for event(s) */ + xhci_interrupt_poll(sc); if (status & (XHCI_STS_PCD | XHCI_STS_HCH | XHCI_STS_HSE | XHCI_STS_HCE)) { @@ -1618,7 +1621,6 @@ xhci_interrupt(struct xhci_softc *sc) __FUNCTION__); } } -done: USB_BUS_UNLOCK(&sc->sc_bus); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401240724.s0O7Of2E002916>