diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-05-16 13:41:28 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-05-16 13:41:28 +0000 |
commit | ead7fd332ee758b2030399167e69612f61e6027d (patch) | |
tree | 30f7bff2bc94c7d8238761d3c6c1d0a1521a51e1 /sys/dev/pci | |
parent | 60de2c41ea2b387be2e4b7b9b565329dd0a61c36 (diff) |
Bring chip out of suspend mode in case we're booting after a shutdown from
Windows. Needed for the VT6102, but doesn't hurt older chips; from FreeBSD.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_vr.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/if_vrreg.h | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index d4b54accdce..2d93dbe5c91 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.14 2001/03/25 06:34:51 csapuntz Exp $ */ +/* $OpenBSD: if_vr.c,v 1.15 2001/05/16 13:41:27 aaron Exp $ */ /* * Copyright (c) 1997, 1998 @@ -699,6 +699,13 @@ vr_attach(parent, self, aux) } printf(": %s", intrstr); + /* + * 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/pci/if_vrreg.h b/sys/dev/pci/if_vrreg.h index 8f7fd466176..ba0cd01a4aa 100644 --- a/sys/dev/pci/if_vrreg.h +++ b/sys/dev/pci/if_vrreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vrreg.h,v 1.4 2001/02/20 19:12:48 jason Exp $ */ +/* $OpenBSD: if_vrreg.h,v 1.5 2001/05/16 13:41:27 aaron Exp $ */ /* * Copyright (c) 1997, 1998 @@ -81,6 +81,7 @@ #define VR_CONFIG 0x78 #define VR_MPA_CNT 0x7C #define VR_CRC_CNT 0x7E +#define VR_STICKHW 0x83 /* * RX config bits. @@ -271,6 +272,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. */ |