Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Call wm_enable_phy_wakeup() on PCH2 and newer, t...



details:   https://anonhg.NetBSD.org/src/rev/58de792fbb3d
branches:  trunk
changeset: 348822:58de792fbb3d
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Nov 10 06:57:15 2016 +0000

description:
Call wm_enable_phy_wakeup() on PCH2 and newer, too. Now these devices
can do WOL. Tested with Thinkpad X220(PCH2).

diffstat:

 sys/dev/pci/if_wm.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 0d50e3f638a1 -r 58de792fbb3d sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Nov 10 06:44:35 2016 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Nov 10 06:57:15 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.441 2016/11/08 10:37:40 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.442 2016/11/10 06:57:15 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.441 2016/11/08 10:37:40 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.442 2016/11/10 06:57:15 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -12151,9 +12151,9 @@
        CSR_WRITE(sc, WMREG_RCTL, CSR_READ(sc, WMREG_RCTL) | RCTL_MPE);
 #endif
 
-       if (sc->sc_type == WM_T_PCH) {
+       if (sc->sc_type >= WM_T_PCH)
                wm_enable_phy_wakeup(sc);
-       } else {
+       else {
                CSR_WRITE(sc, WMREG_WUC, WUC_PME_EN);
                CSR_WRITE(sc, WMREG_WUFC, reg);
        }



Home | Main Index | Thread Index | Old Index