summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2018-07-04 21:11:29 +0200
committerDavid S. Miller <davem@davemloft.net>2018-07-05 13:24:32 +0900
commit6fcf9b1d4d6cd38202247de5c0ac7d85c4483abb (patch)
treec3072c4473ff3448497d308ce7a0c475b137f70a
parenta4ca8b7df73c6d78b8b5aa8246a7d794b25c25ce (diff)
downloadlinux-6fcf9b1d4d6cd38202247de5c0ac7d85c4483abb.tar.bz2
r8169: fix runtime suspend
When runtime-suspending we configure WoL w/o touching saved_wolopts. If saved_wolopts == 0 we would power down the PHY in this case what's wrong. Therefore we have to check the actual chip WoL settings here. Fixes: 433f9d0ddcc6 ("r8169: improve saved_wolopts handling") Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/realtek/r8169.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index f80ac894ef92..d598fdf0470c 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -1534,12 +1534,6 @@ static void rtl8169_check_link_status(struct net_device *dev,
#define WAKE_ANY (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_BCAST | WAKE_MCAST)
-/* Currently we only enable WoL if explicitly told by userspace to circumvent
- * issues on certain platforms, see commit bde135a672bf ("r8169: only enable
- * PCI wakeups when WOL is active"). Let's keep __rtl8169_get_wol() for the
- * case that we want to respect BIOS settings again.
- */
-#if 0
static u32 __rtl8169_get_wol(struct rtl8169_private *tp)
{
u8 options;
@@ -1574,7 +1568,6 @@ static u32 __rtl8169_get_wol(struct rtl8169_private *tp)
return wolopts;
}
-#endif
static void rtl8169_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
@@ -4470,7 +4463,7 @@ static void rtl_wol_suspend_quirk(struct rtl8169_private *tp)
static bool rtl_wol_pll_power_down(struct rtl8169_private *tp)
{
- if (!netif_running(tp->dev) || !tp->saved_wolopts)
+ if (!netif_running(tp->dev) || !__rtl8169_get_wol(tp))
return false;
rtl_speed_down(tp);