summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge/if_bgereg.h
diff options
context:
space:
mode:
authorambrisko <ambrisko@FreeBSD.org>2006-09-09 03:36:57 +0000
committerambrisko <ambrisko@FreeBSD.org>2006-09-09 03:36:57 +0000
commit4ee57c310a87c9a069e7e2e5457777d44d586fff (patch)
treeeb84d70d1211215edef5a2b06d4ce5bc52faf26b /sys/dev/bge/if_bgereg.h
parentbe6654fb4af5da493ea3005c917836d5bd77b916 (diff)
downloadFreeBSD-src-4ee57c310a87c9a069e7e2e5457777d44d586fff.zip
FreeBSD-src-4ee57c310a87c9a069e7e2e5457777d44d586fff.tar.gz
Add support to bge(4) to not break IPMI support when the driver attaches
to it. Try to co-operate with the IPMI/ASF firmware accessing the PHY. One we get link we don't mess with the PHY. If we do then over time the NIC will go off line. It would be nice if we could tell if IPMI was enabled on the chip but I can't figure out a reliable way to do that. The scheme I tried worked on a Dell PE850 but not on an HP machine. So we assume any NIC that has ASF capability needs to deal with it. The code was inspired by the support in Linux from kernel.org and Broadcom. Broadcom did give me some info. but it is rather limited and is mostly just what is in the Linux driver. Thanks to the numerous people that helped debug the many prior versions and that I didn't break other bge(4) HW. Reviewed by: several people Tested by: even more
Diffstat (limited to 'sys/dev/bge/if_bgereg.h')
-rw-r--r--sys/dev/bge/if_bgereg.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index 1e30010..fdfac39 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -74,6 +74,11 @@
#define BGE_SOFTWARE_GENCOMM 0x00000B50
#define BGE_SOFTWARE_GENCOMM_SIG 0x00000B54
#define BGE_SOFTWARE_GENCOMM_NICCFG 0x00000B58
+#define BGE_SOFTWARE_GENCOMM_FW 0x00000B78
+#define BGE_FW_DRV_ALIVE 0x00000001
+#define BGE_FW_PAUSE 0x00000002
+#define BGE_SOFTWARE_GENNCOMM_FW_LEN 0x00000B7C
+#define BGE_SOFTWARE_GENNCOMM_FW_DATA 0x00000B80
#define BGE_SOFTWARE_GENCOMM_END 0x00000FFF
#define BGE_UNMAPPED 0x00001000
#define BGE_UNMAPPED_END 0x00001FFF
@@ -1651,6 +1656,7 @@
#define BGE_MODE_CTL 0x6800
#define BGE_MISC_CFG 0x6804
#define BGE_MISC_LOCAL_CTL 0x6808
+#define BGE_CPU_EVENT 0x6810
#define BGE_EE_ADDR 0x6838
#define BGE_EE_DATA 0x683C
#define BGE_EE_CTL 0x6840
@@ -2064,6 +2070,7 @@ struct bge_status_block {
#define BGE_HWCFG_VOLTAGE 0x00000003
#define BGE_HWCFG_PHYLED_MODE 0x0000000C
#define BGE_HWCFG_MEDIA 0x00000030
+#define BGE_HWCFG_ASF 0x00000080
#define BGE_VOLTAGE_1POINT3 0x00000000
#define BGE_VOLTAGE_1POINT8 0x00000001
@@ -2434,6 +2441,10 @@ struct bge_bcom_hack {
int val;
};
+#define ASF_ENABLE 1
+#define ASF_NEW_HANDSHAKE 2
+#define ASF_STACKUP 4
+
struct bge_softc {
struct ifnet *bge_ifp; /* interface info */
device_t bge_dev;
@@ -2453,8 +2464,10 @@ struct bge_softc {
#define BGE_FLAG_PCIX 0x00000010
#define BGE_FLAG_PCIE 0x00000020
uint32_t bge_chipid;
- uint8_t bge_asicrev;
- uint8_t bge_chiprev;
+ uint8_t bge_asicrev;
+ uint8_t bge_chiprev;
+ uint8_t bge_asf_mode;
+ uint8_t bge_asf_count;
struct bge_ring_data bge_ldata; /* rings */
struct bge_chain_data bge_cdata; /* mbufs */
uint16_t bge_tx_saved_considx;
OpenPOWER on IntegriCloud