summaryrefslogtreecommitdiffstats
path: root/sys/dev/vr
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2001-05-14 19:13:02 +0000
committerwpaul <wpaul@FreeBSD.org>2001-05-14 19:13:02 +0000
commitcec00d25651e4ef292151b8418a07870db451943 (patch)
treee30606b42f6f3639f9a63af5a0ea3c7d36423b9f /sys/dev/vr
parentc03c679bb8c2a8d8f60394a320dfbd8cb6dec2d1 (diff)
downloadFreeBSD-src-cec00d25651e4ef292151b8418a07870db451943.zip
FreeBSD-src-cec00d25651e4ef292151b8418a07870db451943.tar.gz
Close PR 22208: bring chip out of suspend mode, because Windows might
have put the chip to sleep at shutdown. This is really only for the VT6102, but it doesn't hurt the older chips.
Diffstat (limited to 'sys/dev/vr')
-rw-r--r--sys/dev/vr/if_vr.c7
-rw-r--r--sys/dev/vr/if_vrreg.h8
2 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index 2d14680..93fba3e 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -724,6 +724,13 @@ static int vr_attach(dev)
goto fail;
}
+ /*
+ * Windows may put the chip in suspend mode when it
+ * shuts down. Be sure to kick it in the head to wake it
+ * up again.
+ */
+ VR_CLRBIT(sc, VR_STICKHW, (VR_STICKHW_DS0|VR_STICKHW_DS1));
+
/* Reset the adapter. */
vr_reset(sc);
diff --git a/sys/dev/vr/if_vrreg.h b/sys/dev/vr/if_vrreg.h
index 235962d..c84f5c2 100644
--- a/sys/dev/vr/if_vrreg.h
+++ b/sys/dev/vr/if_vrreg.h
@@ -79,6 +79,7 @@
#define VR_CONFIG 0x78
#define VR_MPA_CNT 0x7C
#define VR_CRC_CNT 0x7E
+#define VR_STICKHW 0x83
/*
* RX config bits.
@@ -269,6 +270,13 @@
#define VR_CFG_DIAG 0x40000000
#define VR_CFG_GPIOEN 0x80000000
+/* Sticky HW bits */
+#define VR_STICKHW_DS0 0x01
+#define VR_STICKHW_DS1 0x02
+#define VR_STICKHW_WOL_ENB 0x04
+#define VR_STICKHW_WOL_STS 0x08
+#define VR_STICKHW_LEGWOL_ENB 0x80
+
/*
* Rhine TX/RX list structure.
*/
OpenPOWER on IntegriCloud