--- src/sys/bus/usb/uhci_pci.c 2005/05/24 20:58:54 1.5 +++ src/sys/bus/usb/uhci_pci.c 2005/09/20 09:06:58 1.6 @@ -326,14 +326,6 @@ uhci_pci_attach(device_t self) break; } - err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, - (driver_intr_t *) uhci_intr, sc, &sc->ih, NULL); - if (err) { - device_printf(self, "Could not setup irq, %d\n", err); - sc->ih = NULL; - uhci_pci_detach(self); - return ENXIO; - } /* * Set the PIRQD enable bit and switch off all the others. We don't * want legacy support to interfere with us XXX Does this also mean @@ -356,6 +348,16 @@ uhci_pci_attach(device_t self) uhci_pci_detach(self); return EIO; } + + err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, + (driver_intr_t *) uhci_intr, sc, &sc->ih, NULL); + if (err) { + device_printf(self, "Could not setup irq, %d\n", err); + sc->ih = NULL; + uhci_pci_detach(self); + return ENXIO; + } + return 0; /* success */ }