diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 2d1468024c27..93fba3ec9afe 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 235962d013c6..c84f5c242804 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 2d1468024c27..93fba3ec9afe 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 235962d013c6..c84f5c242804 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. */