Deleted Added
full compact
27c27
< __FBSDID("$FreeBSD: head/sys/dev/usb/controller/xhci_pci.c 249336 2013-04-10 17:43:20Z mav $");
---
> __FBSDID("$FreeBSD: head/sys/dev/usb/controller/xhci_pci.c 251499 2013-06-07 14:30:06Z hselasky $");
134a135,144
> static void
> xhci_interrupt_poll(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_interrupt_poll, sc);
> }
>
161a172,173
> usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0);
>
167d178
< goto error;
178,188c189,195
< #if (__FreeBSD_version >= 700031)
< 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);
< #else
< err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
< (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl);
< #endif
< if (err) {
< device_printf(self, "Could not setup IRQ, err=%d\n", err);
< sc->sc_intr_hdl = NULL;
< goto error;
---
> 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);
> if (err != 0) {
> device_printf(self, "Could not setup IRQ, err=%d\n", err);
> sc->sc_intr_hdl = NULL;
> }
189a197,204
> if (sc->sc_irq_res == NULL || sc->sc_intr_hdl == NULL ||
> xhci_use_polling() != 0) {
> device_printf(self, "Interrupt polling at %dHz\n", hz);
> USB_BUS_LOCK(&sc->sc_bus);
> xhci_interrupt_poll(sc);
> USB_BUS_UNLOCK(&sc->sc_bus);
> }
>
224a240,244
> if (sc->sc_io_res) {
> usb_callout_drain(&sc->sc_callout);
> xhci_halt_controller(sc);
> }
>
228,230d247
<
< xhci_halt_controller(sc);
<