xhci(4)'s interrupt handler only schedule a soft-interrupt so we could
mark it IPL_MPSAFE.
Index: dev/pci/xhci_pci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/xhci_pci.c,v
retrieving revision 1.6
diff -u -p -r1.6 xhci_pci.c
--- dev/pci/xhci_pci.c 22 Jun 2015 08:43:27 -0000 1.6
+++ dev/pci/xhci_pci.c 27 Oct 2015 15:31:09 -0000
@@ -164,7 +164,7 @@ xhci_pci_attach(struct device *parent, s
}
intrstr = pci_intr_string(pa->pa_pc, ih);
- psc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_USB,
+ psc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_USB | IPL_MPSAFE,
xhci_intr, psc, psc->sc.sc_bus.bdev.dv_xname);
if (psc->sc_ih == NULL) {
printf(": couldn't establish interrupt");
Index: dev/usb/xhci.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/xhci.c,v
retrieving revision 1.63
diff -u -p -r1.63 xhci.c
--- dev/usb/xhci.c 12 Jul 2015 12:54:31 -0000 1.63
+++ dev/usb/xhci.c 27 Oct 2015 15:29:48 -0000
@@ -606,13 +606,11 @@ xhci_intr1(struct xhci_softc *sc)
if ((intrs & XHCI_STS_EINT) == 0)
return (0);
- sc->sc_bus.intr_context++;
sc->sc_bus.no_intrs++;
if (intrs & XHCI_STS_HSE) {
printf("%s: host system error\n", DEVNAME(sc));
sc->sc_bus.dying = 1;
- sc->sc_bus.intr_context--;
return (1);
}
@@ -622,8 +620,6 @@ xhci_intr1(struct xhci_softc *sc)
/* Acknowledge PCI interrupt */
intrs = XRREAD4(sc, XHCI_IMAN(0));
XRWRITE4(sc, XHCI_IMAN(0), intrs | XHCI_IMAN_INTR_PEND);
-
- sc->sc_bus.intr_context--;
return (1);
}