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_wakeup() in wm_detach() and wm_su...



details:   https://anonhg.NetBSD.org/src/rev/1475f9a15800
branches:  trunk
changeset: 348800:1475f9a15800
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Nov 08 08:54:30 2016 +0000

description:
Call wm_enable_wakeup() in wm_detach() and wm_suspend(). Now wake on lan
works on Thinkpad X61(ICH8). Some workarounds will be required on PCH*.

diffstat:

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

diffs (73 lines):

diff -r 080d2e6aaec9 -r 1475f9a15800 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Tue Nov 08 08:48:35 2016 +0000
+++ b/sys/dev/pci/if_wm.c       Tue Nov 08 08:54:30 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.438 2016/11/06 02:38:25 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.439 2016/11/08 08:54:30 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.438 2016/11/06 02:38:25 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.439 2016/11/08 08:54:30 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -824,7 +824,7 @@
  * Management mode and power management related subroutines.
  * BMC, AMT, suspend/resume and EEE.
  */
-#ifdef WM_WOL
+#if 0
 static int     wm_check_mng_mode(struct wm_softc *);
 static int     wm_check_mng_mode_ich8lan(struct wm_softc *);
 static int     wm_check_mng_mode_82574(struct wm_softc *);
@@ -839,11 +839,9 @@
 static void    wm_init_manageability(struct wm_softc *);
 static void    wm_release_manageability(struct wm_softc *);
 static void    wm_get_wakeup(struct wm_softc *);
-#ifdef WM_WOL
 static void    wm_enable_phy_wakeup(struct wm_softc *);
 static void    wm_igp3_phy_powerdown_workaround_ich8lan(struct wm_softc *);
 static void    wm_enable_wakeup(struct wm_softc *);
-#endif
 /* LPLU (Low Power Link Up) */
 static void    wm_lplu_d0_disable(struct wm_softc *);
 static void    wm_lplu_d0_disable_pch(struct wm_softc *);
@@ -2678,6 +2676,7 @@
        WM_CORE_LOCK(sc);
        wm_release_manageability(sc);
        wm_release_hw_control(sc);
+       wm_enable_wakeup(sc);
        WM_CORE_UNLOCK(sc);
 
        mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
@@ -2740,9 +2739,7 @@
 
        wm_release_manageability(sc);
        wm_release_hw_control(sc);
-#ifdef WM_WOL
        wm_enable_wakeup(sc);
-#endif
 
        return true;
 }
@@ -12019,7 +12016,6 @@
         */
 }
 
-#ifdef WM_WOL
 /* WOL in the newer chipset interfaces (pchlan) */
 static void
 wm_enable_phy_wakeup(struct wm_softc *sc)
@@ -12167,7 +12163,6 @@
 #endif
        pci_conf_write(sc->sc_pc, sc->sc_pcitag, pmreg + PCI_PMCSR, pmode);
 }
-#endif /* WM_WOL */
 
 /* LPLU */
 



Home | Main Index | Thread Index | Old Index