summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-12-12 05:25:09 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-12-12 05:25:09 +0000
commite60c065d91d70adeda4e2f257fc8467e046605d0 (patch)
treeae9b14f0a5619835810742dde34898a386e403cc /sys
parentdfaabf3c0084be67303a43d34e42b77f2fdfc365 (diff)
If a PCI-X card is detected then set bge_pcix.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_bge.c10
-rw-r--r--sys/dev/pci/if_bgereg.h4
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index c99d24ff12e..7289f9359e1 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.115 2005/12/11 01:37:21 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.116 2005/12/12 05:25:07 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -1830,6 +1830,14 @@ bge_attach(struct device *parent, struct device *self, void *aux)
NULL, NULL) != 0)
sc->bge_pcie = 1;
+ /*
+ * PCI-X check.
+ */
+ sc->bge_pcix = 0;
+ if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIX,
+ NULL, NULL) != 0)
+ sc->bge_pcix = 1;
+
/* Try to reset the chip. */
DPRINTFN(5, ("bge_reset\n"));
bge_reset(sc);
diff --git a/sys/dev/pci/if_bgereg.h b/sys/dev/pci/if_bgereg.h
index c6da0c8b2bf..93caa9eec6f 100644
--- a/sys/dev/pci/if_bgereg.h
+++ b/sys/dev/pci/if_bgereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bgereg.h,v 1.35 2005/12/11 01:37:21 brad Exp $ */
+/* $OpenBSD: if_bgereg.h,v 1.36 2005/12/12 05:25:08 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -1689,6 +1689,7 @@
/* Misc. config register */
#define BGE_MISCCFG_RESET_CORE_CLOCKS 0x00000001
#define BGE_MISCCFG_TIMER_PRESCALER 0x000000FE
+#define BGE_MISCCFG_GPHY_POWER_RESET 0x04000000
#define BGE_32BITTIME_66MHZ (0x41 << 1)
@@ -2333,6 +2334,7 @@ struct bge_softc {
u_int8_t bge_no_3_led;
u_int8_t bge_asf_mode;
u_int8_t bge_pcie;
+ u_int8_t bge_pcix;
struct bge_ring_data *bge_rdata; /* rings */
struct bge_chain_data bge_cdata; /* mbufs */
bus_dmamap_t bge_ring_map;