Playing around with one of my amd64 systems with an NVIDIA chipset and
disabling acpimadt I created a situation where pci_intr_establish() failed
for the PCIe slot with a bnx(4) adapter and that had exposed these bugs.
This corrects the dmesg output if pci_intr_establish() fails and fixes
the error message printed if pci_intr_establish() fails to match the
behavior of other drivers.
Index: if_bnx.c
===================================================================
RCS file: /home/cvs/src/sys/dev/pci/if_bnx.c,v
retrieving revision 1.95
diff -u -p -r1.95 if_bnx.c
--- if_bnx.c 22 Jun 2011 16:44:27 -0000 1.95
+++ if_bnx.c 17 Sep 2011 20:51:19 -0000
@@ -748,17 +749,19 @@ bnx_attach(struct device *parent, struct
if (val & BNX_PCICFG_MISC_STATUS_32BIT_DET)
sc->bnx_flags |= BNX_PCI_32BIT_FLAG;
- printf(": %s\n", intrstr);
-
/* Hookup IRQ last. */
sc->bnx_intrhand = pci_intr_establish(pc, sc->bnx_ih, IPL_NET,
bnx_intr, sc, sc->bnx_dev.dv_xname);
if (sc->bnx_intrhand == NULL) {
- printf("%s: couldn't establish interrupt\n",
- sc->bnx_dev.dv_xname);
+ printf(": couldn't establish interrupt");
+ if (intrstr != NULL)
+ printf(" at %s", intrstr);
+ printf("\n");
goto bnx_attach_fail;
}
+ printf(": %s\n", intrstr);
+
mountroothook_establish(bnx_attachhook, sc);
return;
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.