=== ./xhci.c ================================================================== --- ./xhci.c (revision 255094) +++ ./xhci.c (local) @@ -385,10 +385,6 @@ sc->sc_exit_lat_max = XHCI_HCS3_U1_DEL(temp) + XHCI_HCS3_U2_DEL(temp) + 250 /* us */; - temp = XREAD4(sc, oper, XHCI_USBSTS); - - /* clear interrupts */ - XWRITE4(sc, oper, XHCI_USBSTS, temp); /* disable all device notifications */ XWRITE4(sc, oper, XHCI_DNCTRL, 0); @@ -1479,7 +1475,9 @@ USB_BUS_LOCK(&sc->sc_bus); status = XREAD4(sc, oper, XHCI_USBSTS); - if (status == 0) + iman = XREAD4(sc, runt, XHCI_IMAN(0)); + + if (status == 0 && (iman & XHCI_IMAN_INTR_PEND) == 0) goto done; /* acknowledge interrupts */ @@ -1488,11 +1486,8 @@ DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); - if (status & XHCI_STS_EINT) { + if (iman & XHCI_IMAN_INTR_PEND) { - /* acknowledge pending event */ - iman = XREAD4(sc, runt, XHCI_IMAN(0)); - /* reset interrupt */ XWRITE4(sc, runt, XHCI_IMAN(0), iman);