diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-01-24 07:24:40 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-01-24 07:24:40 +0000 |
commit | f51f01df30facd779f17dccce599f8cdc09de988 (patch) | |
tree | e53a7db98630682080e1b022dea131b06cc615a2 /sys/dev/usb/controller/xhci.c | |
parent | 3a9defd5d23f32eee2ae7c343de696ad779cf540 (diff) | |
download | FreeBSD-src-f51f01df30facd779f17dccce599f8cdc09de988.zip FreeBSD-src-f51f01df30facd779f17dccce599f8cdc09de988.tar.gz |
MFC r260388, r260535 and r260536:
Fix XHCI interrupt logic for "Intel Lynx Point" found in MBP2013.
Diffstat (limited to 'sys/dev/usb/controller/xhci.c')
-rw-r--r-- | sys/dev/usb/controller/xhci.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 8512693..5bcf509 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -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); } |