Lines 142-147
Link Here
|
142 |
usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_interrupt_poll, sc); |
142 |
usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_interrupt_poll, sc); |
143 |
} |
143 |
} |
144 |
|
144 |
|
|
|
145 |
static void |
146 |
xhci_timer(void *_sc) |
147 |
{ |
148 |
struct xhci_softc *sc = _sc; |
149 |
USB_BUS_UNLOCK(&sc->sc_bus); |
150 |
xhci_interrupt(sc); |
151 |
USB_BUS_LOCK(&sc->sc_bus); |
152 |
usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_timer, sc); |
153 |
} |
154 |
|
145 |
static int |
155 |
static int |
146 |
xhci_pci_attach(device_t self) |
156 |
xhci_pci_attach(device_t self) |
147 |
{ |
157 |
{ |
Lines 186-191
Link Here
|
186 |
|
196 |
|
187 |
sprintf(sc->sc_vendor, "0x%04x", pci_get_vendor(self)); |
197 |
sprintf(sc->sc_vendor, "0x%04x", pci_get_vendor(self)); |
188 |
|
198 |
|
|
|
199 |
usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); |
200 |
|
201 |
USB_BUS_LOCK(&sc->sc_bus); |
202 |
xhci_timer(sc); |
203 |
USB_BUS_UNLOCK(&sc->sc_bus); |
204 |
|
189 |
if (sc->sc_irq_res != NULL) { |
205 |
if (sc->sc_irq_res != NULL) { |
190 |
err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, |
206 |
err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, |
191 |
NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); |
207 |
NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); |