r8169: fix broken Wake-on-LAN from S5 (poweroff)
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 25 Oct 2018 16:40:19 +0000 (18:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Nov 2018 13:50:53 +0000 (14:50 +0100)
commit4778b9f0268cc68ad197ed8e39a7ab2400b82f8d
tree894711584db8a1ad5cef8a877d77c9991dd19f03
parent89e5f2d9219dbd522e6d60e7639f09fa1ccda1cd
r8169: fix broken Wake-on-LAN from S5 (poweroff)

[ Upstream commit 649f0837a8cc2b39329f2de00fa0d04b029291c5 ]

It was reported that WoL from S5 is broken (WoL from S3 works) and the
analysis showed that during system shutdown the network interface was
brought down already when the actual kernel shutdown started.
Therefore netif_running() returned false and as a consequence the PHY
was suspended. Obviously WoL wasn't working then.
To fix this the original patch needs to be effectively reverted.
A side effect is that when normally bringing down the interface and
WoL is enabled the PHY will remain powered on (like it was before the
original patch).

Fixes: fe87bef01f9b ("r8169: don't check WoL when powering down PHY and interface is down")
Reported-by: Neil MacLeod <neil@nmacleod.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/realtek/r8169.c