summaryrefslogtreecommitdiffstats
path: root/sys/pci/ohci_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/ohci_pci.c')
-rw-r--r--sys/pci/ohci_pci.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/pci/ohci_pci.c b/sys/pci/ohci_pci.c
index 591f665..7bce5f2 100644
--- a/sys/pci/ohci_pci.c
+++ b/sys/pci/ohci_pci.c
@@ -150,6 +150,14 @@ ohci_pci_attach(device_t self)
void *ih;
int intr;
+ /* 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;
+ }
+
/* XXX where does it say so in the spec? */
sc->sc_bus.usbrev = USBREV_1_0;
@@ -214,14 +222,6 @@ ohci_pci_attach(device_t self)
sprintf(sc->sc_vendor, "(unknown)");
}
- 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 *) ohci_intr, sc, &ih);
if (err) {
OpenPOWER on IntegriCloud