=== xhci.h ================================================================== --- xhci.h (revision 252698) +++ xhci.h (local) @@ -438,6 +438,8 @@ /* configure message */ struct usb_bus_msg sc_config_msg[2]; + struct usb_callout sc_callout; + union xhci_hub_desc sc_hub_desc; struct cv sc_cmd_cv; === xhci_pci.c ================================================================== --- xhci_pci.c (revision 252698) +++ xhci_pci.c (local) @@ -142,6 +142,16 @@ usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_interrupt_poll, sc); } +static void +xhci_timer(void *_sc) +{ + struct xhci_softc *sc = _sc; + USB_BUS_UNLOCK(&sc->sc_bus); + xhci_interrupt(sc); + USB_BUS_LOCK(&sc->sc_bus); + usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_timer, sc); +} + static int xhci_pci_attach(device_t self) { @@ -186,6 +196,12 @@ sprintf(sc->sc_vendor, "0x%04x", pci_get_vendor(self)); + usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); + + USB_BUS_LOCK(&sc->sc_bus); + xhci_timer(sc); + USB_BUS_UNLOCK(&sc->sc_bus); + if (sc->sc_irq_res != NULL) { err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl);