CHROMIUM: r8169: Disable WOL by default
authorTodd Broch <tbroch@chromium.org>
Fri, 24 Feb 2012 01:15:46 +0000 (17:15 -0800)
committerOlof Johansson <olof@lixom.net>
Fri, 1 Jun 2012 06:56:36 +0000 (23:56 -0700)
Set the WOL config registers to be disabled by default. Without this change in
place, the WOL config register settings on warm reboot come up in an
inconsistent state since these registers don't get reset on a warm reboot.

BUG=chrome-os-partner:7026
TEST=On a system with a realtek ethernet MAC, do the following
test1,
  1. run "ethtool -s eth0 wol g" to enable WOL from PHY activity
  2. reboot the system
  3. run "ethtool eth0" and check that "g" is not listed in "Wake-on"

test2, Run network_EthCapsServer.py and make sure it still wakes

test3, Measure power during S3 from cold-boot see ~100mW less with WOL disabled

Change-Id: I469b0fc7cac17bf612be3229b8c1770bcd237df6
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/16432
Reviewed-by: Sameer Nanda <snanda@chromium.org>
drivers/net/ethernet/realtek/r8169.c

index 3fabaf9..7122e77 100644 (file)
@@ -6211,9 +6211,8 @@ rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        RTL_W8(Cfg9346, Cfg9346_Unlock);
        RTL_W8(Config1, RTL_R8(Config1) | PMEnable);
-       RTL_W8(Config3, MagicPacket);
+       RTL_W8(Config3, 0);
        RTL_W8(Config5, PMEStatus);
-       tp->features |= RTL_FEATURE_WOL;
        tp->features |= rtl_try_msi(tp, cfg);
        RTL_W8(Cfg9346, Cfg9346_Lock);