svn commit: r230336 - head/sys/dev/re

Pyun YongHyeon yongari at FreeBSD.org
Thu Jan 19 20:13:16 UTC 2012


Author: yongari
Date: Thu Jan 19 20:13:16 2012
New Revision: 230336
URL: http://svn.freebsd.org/changeset/base/230336

Log:
  Fix a logic error which resulted in putting PHY into sleep when WOL
  is active.  If WOL is active driver should not put PHY into sleep.
  This change makes WOL work on RTL8168E.

Modified:
  head/sys/dev/re/if_re.c

Modified: head/sys/dev/re/if_re.c
==============================================================================
--- head/sys/dev/re/if_re.c	Thu Jan 19 19:39:41 2012	(r230335)
+++ head/sys/dev/re/if_re.c	Thu Jan 19 20:13:16 2012	(r230336)
@@ -3808,7 +3808,7 @@ re_setwol(struct rl_softc *sc)
 	/* Config register write done. */
 	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
 
-	if ((ifp->if_capenable & IFCAP_WOL) != 0 &&
+	if ((ifp->if_capenable & IFCAP_WOL) == 0 &&
 	    (sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0)
 		CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) & ~0x80);
 	/*


More information about the svn-src-head mailing list