diff options
-rw-r--r-- | sys/dev/vr/if_vr.c | 7 | ||||
-rw-r--r-- | sys/dev/vr/if_vrreg.h | 8 | ||||
-rw-r--r-- | sys/pci/if_vr.c | 7 | ||||
-rw-r--r-- | sys/pci/if_vrreg.h | 8 |
4 files changed, 30 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. */ diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 2d14680..93fba3e 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/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/pci/if_vrreg.h b/sys/pci/if_vrreg.h index 235962d..c84f5c2 100644 --- a/sys/pci/if_vrreg.h +++ b/sys/pci/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. */ |