Commit 06e56697 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: re-configure WOL settings on resume from hibernation

So far we don't re-configure WOL-related register bits when waking up
from hibernation. I'm not aware of any problem reports, but better
play safe and call __rtl8169_set_wol() in the resume() path too.
To achieve this move calling __rtl8169_set_wol() to
rtl8169_net_resume() and rename the function to rtl8169_runtime_resume().
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 50d3da75
...@@ -4804,9 +4804,12 @@ static void rtl8169_net_suspend(struct rtl8169_private *tp) ...@@ -4804,9 +4804,12 @@ static void rtl8169_net_suspend(struct rtl8169_private *tp)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int rtl8169_net_resume(struct rtl8169_private *tp) static int rtl8169_runtime_resume(struct device *dev)
{ {
struct rtl8169_private *tp = dev_get_drvdata(dev);
rtl_rar_set(tp, tp->dev->dev_addr); rtl_rar_set(tp, tp->dev->dev_addr);
__rtl8169_set_wol(tp, tp->saved_wolopts);
if (tp->TxDescArray) if (tp->TxDescArray)
rtl8169_up(tp); rtl8169_up(tp);
...@@ -4840,7 +4843,7 @@ static int __maybe_unused rtl8169_resume(struct device *device) ...@@ -4840,7 +4843,7 @@ static int __maybe_unused rtl8169_resume(struct device *device)
if (tp->mac_version == RTL_GIGA_MAC_VER_37) if (tp->mac_version == RTL_GIGA_MAC_VER_37)
rtl_init_rxcfg(tp); rtl_init_rxcfg(tp);
return rtl8169_net_resume(tp); return rtl8169_runtime_resume(device);
} }
static int rtl8169_runtime_suspend(struct device *device) static int rtl8169_runtime_suspend(struct device *device)
...@@ -4860,15 +4863,6 @@ static int rtl8169_runtime_suspend(struct device *device) ...@@ -4860,15 +4863,6 @@ static int rtl8169_runtime_suspend(struct device *device)
return 0; return 0;
} }
static int rtl8169_runtime_resume(struct device *device)
{
struct rtl8169_private *tp = dev_get_drvdata(device);
__rtl8169_set_wol(tp, tp->saved_wolopts);
return rtl8169_net_resume(tp);
}
static int rtl8169_runtime_idle(struct device *device) static int rtl8169_runtime_idle(struct device *device)
{ {
struct rtl8169_private *tp = dev_get_drvdata(device); struct rtl8169_private *tp = dev_get_drvdata(device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment