summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_bge.c
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2010-04-06 15:27:52 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2010-04-06 15:27:52 +0000
commit10b632d51941a9fda8546c12c9a98f4dccecff8f (patch)
treee02e0ce97281ff36fff66d3eacb8e31a88bf19d9 /sys/dev/pci/if_bge.c
parentbda25d7c59718889fb1f1811744126e675edb2bb (diff)
A fix for the PCI-X check so that this is only tested on controllers
that could be PCI-X. This bit is not valid for PCIe controllers. From Brad
Diffstat (limited to 'sys/dev/pci/if_bge.c')
-rw-r--r--sys/dev/pci/if_bge.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 518509d11f7..1bfa06f1c6a 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.292 2010/03/30 14:24:03 naddy Exp $ */
+/* $OpenBSD: if_bge.c,v 1.293 2010/04/06 15:27:51 naddy Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -1875,18 +1875,16 @@ bge_attach(struct device *parent, struct device *self, void *aux)
printf("%s (0x%x)", br->br_name, sc->bge_chipid);
/*
- * PCI Express check.
+ * PCI Express or PCI-X controller check.
*/
if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIEXPRESS,
- NULL, NULL) != 0)
+ NULL, NULL) != 0) {
sc->bge_flags |= BGE_PCIE;
-
- /*
- * PCI-X check.
- */
- if ((pci_conf_read(pa->pa_pc, pa->pa_tag, BGE_PCI_PCISTATE) &
- BGE_PCISTATE_PCI_BUSMODE) == 0)
- sc->bge_flags |= BGE_PCIX;
+ } else {
+ if ((pci_conf_read(pa->pa_pc, pa->pa_tag, BGE_PCI_PCISTATE) &
+ BGE_PCISTATE_PCI_BUSMODE) == 0)
+ sc->bge_flags |= BGE_PCIX;
+ }
/*
* SEEPROM check.