31 lines
1.6 KiB
Plaintext
31 lines
1.6 KiB
Plaintext
$OpenBSD: patch-hw_e1000_hw_h,v 1.1 2011/08/28 11:21:05 sthen Exp $
|
|
|
|
use MII status register for link up/down
|
|
|
|
--- hw/e1000_hw.h.orig Fri Aug 26 02:21:00 2011
|
|
+++ hw/e1000_hw.h Fri Aug 26 02:21:40 2011
|
|
@@ -349,6 +349,23 @@
|
|
#define M88E1000_PHY_VCO_REG_BIT8 0x100 /* Bits 8 & 11 are adjusted for */
|
|
#define M88E1000_PHY_VCO_REG_BIT11 0x800 /* improved BER performance */
|
|
|
|
+/* PHY Status Register */
|
|
+#define MII_SR_EXTENDED_CAPS 0x0001 /* Extended register capabilities */
|
|
+#define MII_SR_JABBER_DETECT 0x0002 /* Jabber Detected */
|
|
+#define MII_SR_LINK_STATUS 0x0004 /* Link Status 1 = link */
|
|
+#define MII_SR_AUTONEG_CAPS 0x0008 /* Auto Neg Capable */
|
|
+#define MII_SR_REMOTE_FAULT 0x0010 /* Remote Fault Detect */
|
|
+#define MII_SR_AUTONEG_COMPLETE 0x0020 /* Auto Neg Complete */
|
|
+#define MII_SR_PREAMBLE_SUPPRESS 0x0040 /* Preamble may be suppressed */
|
|
+#define MII_SR_EXTENDED_STATUS 0x0100 /* Ext. status info in Reg 0x0F */
|
|
+#define MII_SR_100T2_HD_CAPS 0x0200 /* 100T2 Half Duplex Capable */
|
|
+#define MII_SR_100T2_FD_CAPS 0x0400 /* 100T2 Full Duplex Capable */
|
|
+#define MII_SR_10T_HD_CAPS 0x0800 /* 10T Half Duplex Capable */
|
|
+#define MII_SR_10T_FD_CAPS 0x1000 /* 10T Full Duplex Capable */
|
|
+#define MII_SR_100X_HD_CAPS 0x2000 /* 100X Half Duplex Capable */
|
|
+#define MII_SR_100X_FD_CAPS 0x4000 /* 100X Full Duplex Capable */
|
|
+#define MII_SR_100T4_CAPS 0x8000 /* 100T4 Capable */
|
|
+
|
|
/* Interrupt Cause Read */
|
|
#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */
|
|
#define E1000_ICR_TXQE 0x00000002 /* Transmit Queue empty */
|