diff options
Diffstat (limited to 'sys/dev/usb/uhci_pci.c')
-rw-r--r-- | sys/dev/usb/uhci_pci.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/usb/uhci_pci.c b/sys/dev/usb/uhci_pci.c index a5d6c9e..8859e50 100644 --- a/sys/dev/usb/uhci_pci.c +++ b/sys/dev/usb/uhci_pci.c @@ -168,6 +168,14 @@ uhci_pci_attach(device_t self) int intr; int err; + /* For the moment, put in a message stating what is wrong */ + intr = pci_read_config(self, PCIR_INTLINE, 1); + if (intr == 0 || intr == 255) { + device_printf(self, "Invalid irq %d\n", intr); + device_printf(self, "Please switch on USB support and switch PNP-OS to 'No' in BIOS\n"); + return ENXIO; + } + rid = PCI_UHCI_BASE_REG; io_res = bus_alloc_resource(self, SYS_RES_IOPORT, &rid, 0, ~0, 1, RF_ACTIVE); @@ -239,14 +247,6 @@ uhci_pci_attach(device_t self) break; } - intr = pci_read_config(self, PCIR_INTLINE, 1); - if (intr == 0 || intr == 255) { - device_printf(self, "Invalid irq %d\n", intr); - device_printf(self, "Please switch on USB support and switch PNP-OS to 'No' in BIOS\n"); - err = ENXIO; - goto bad3; - } - err = BUS_SETUP_INTR(parent, self, irq_res, INTR_TYPE_BIO, (driver_intr_t *) uhci_intr, sc, &ih); if (err) { |