Module Name: src
Committed By: msaitoh
Date: Fri Nov 18 06:55:01 UTC 2016
Modified Files:
src/sys/dev/pci: if_wm.c
Log Message:
Fix WOL related setting of the WUC register for other than PCH*
in wm_enable_wakeup(). Tested with 82567V(ICH8) and 82583V.
To generate a diff of this commit:
cvs rdiff -u -r1.450 -r1.451 src/sys/dev/pci/if_wm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.450 src/sys/dev/pci/if_wm.c:1.451
--- src/sys/dev/pci/if_wm.c:1.450 Thu Nov 17 03:40:08 2016
+++ src/sys/dev/pci/if_wm.c Fri Nov 18 06:55:00 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.450 2016/11/17 03:40:08 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.451 2016/11/18 06:55:00 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.450 2016/11/17 03:40:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.451 2016/11/18 06:55:00 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -12353,7 +12353,7 @@ wm_enable_wakeup(struct wm_softc *sc)
if (sc->sc_type >= WM_T_PCH)
wm_enable_phy_wakeup(sc);
else {
- CSR_WRITE(sc, WMREG_WUC, WUC_PME_EN);
+ CSR_WRITE(sc, WMREG_WUC, CSR_READ(sc, WMREG_WUC) | WUC_PME_EN);
CSR_WRITE(sc, WMREG_WUFC, reg);
}