1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

Shave off another register write to save some more

microseconds of PCI access time.

Tested by:	sos @
Submitted by:	sos @
MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2013-01-08 19:38:57 +00:00
parent 9b6b681624
commit 6317f31612
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245175

View File

@ -1440,24 +1440,33 @@ void
xhci_interrupt(struct xhci_softc *sc)
{
uint32_t status;
uint32_t temp;
uint32_t iman;
USB_BUS_LOCK(&sc->sc_bus);
status = XREAD4(sc, oper, XHCI_USBSTS);
if (status == 0)
goto done;
/* acknowledge interrupts */
XWRITE4(sc, oper, XHCI_USBSTS, status);
temp = XREAD4(sc, runt, XHCI_IMAN(0));
DPRINTFN(16, "real interrupt (status=0x%08x)\n", status);
if (status & XHCI_STS_EINT) {
/* acknowledge pending event */
/* acknowledge pending event */
iman = XREAD4(sc, runt, XHCI_IMAN(0));
XWRITE4(sc, runt, XHCI_IMAN(0), temp);
DPRINTFN(16, "real interrupt (sts=0x%08x, "
"iman=0x%08x)\n", status, temp);
/* reset interrupt */
XWRITE4(sc, runt, XHCI_IMAN(0), iman);
DPRINTFN(16, "real interrupt (iman=0x%08x)\n", iman);
/* check for event(s) */
xhci_interrupt_poll(sc);
}
if (status & (XHCI_STS_PCD | XHCI_STS_HCH |
XHCI_STS_HSE | XHCI_STS_HCE)) {
@ -1481,11 +1490,7 @@ xhci_interrupt(struct xhci_softc *sc)
__FUNCTION__);
}
}
/* check if we need to check the event rings */
if ((status != 0) || (temp & XHCI_IMAN_INTR_PEND))
xhci_interrupt_poll(sc);
done:
USB_BUS_UNLOCK(&sc->sc_bus);
}