Message ID | 20081004180735.2dc9a386@neptune.home |
---|---|
State | Accepted, archived |
Delegated to: | Jeff Garzik |
Headers | show |
--- linux-2.6.27-rc8-git6.orig/drivers/net/r8169.c 2008-10-04 16:37:36.000000000 +0200 +++ linux-2.6.27-rc8-git6/drivers/net/r8169.c 2008-10-04 12:31:48.000000000 +0200 @@ -1706,6 +1706,10 @@ rtl8169_init_one(struct pci_dev *pdev, c RTL_W8(Cfg9346, Cfg9346_Unlock); RTL_W8(Config1, RTL_R8(Config1) | PMEnable); RTL_W8(Config5, RTL_R8(Config5) & PMEStatus); + if ((RTL_R8(Config3) & (LinkUp | MagicPacket)) != 0) + tp->features |= RTL_FEATURE_WOL; + if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0) + tp->features |= RTL_FEATURE_WOL; tp->features |= rtl_try_msi(pdev, ioaddr, cfg); RTL_W8(Cfg9346, Cfg9346_Lock);
When probing the chip and handling it's power management settings also remember wether WoL feature is enabled. Without this patch one has to call ethtool to change WoL settings for this flag to be set and any WoL being enabled on suspend to RAM. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html