mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Optimise the XHCI interrupt handling.
This patch will save CPU time when the XHCI interrupt is shared with other devices. Only check event rings when interrupt bits are set. Otherwise would indicate hiding possible hardware fault(s). Tested by: sos @ Submitted by: sos @ MFC after: 1 week
This commit is contained in:
parent
98f5c0d41a
commit
878b1fbdce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245132
@ -1459,7 +1459,9 @@ xhci_interrupt(struct xhci_softc *sc)
|
||||
DPRINTFN(16, "real interrupt (sts=0x%08x, "
|
||||
"iman=0x%08x)\n", status, temp);
|
||||
|
||||
if (status != 0) {
|
||||
if (status & (XHCI_STS_PCD | XHCI_STS_HCH |
|
||||
XHCI_STS_HSE | XHCI_STS_HCE)) {
|
||||
|
||||
if (status & XHCI_STS_PCD) {
|
||||
xhci_root_intr(sc);
|
||||
}
|
||||
@ -1480,7 +1482,9 @@ xhci_interrupt(struct xhci_softc *sc)
|
||||
}
|
||||
}
|
||||
|
||||
xhci_interrupt_poll(sc);
|
||||
/* check if we need to check the event rings */
|
||||
if ((status != 0) || (temp & XHCI_IMAN_INTR_PEND))
|
||||
xhci_interrupt_poll(sc);
|
||||
|
||||
USB_BUS_UNLOCK(&sc->sc_bus);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user