diff options
author | Kunihiko Hayashi <hayashi.kunihiko@socionext.com> | 2018-12-18 16:57:04 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-18 21:48:15 -0800 |
commit | 8742beb50f2db903d3b6d69ddd81d67ce9914453 (patch) | |
tree | e77125ecd7bb8774c90f74414ff63724e243d52e /drivers/net/xen-netfront.c | |
parent | 15515aaaa69659c502003926a2067ee76176148a (diff) | |
download | linux-stable-8742beb50f2db903d3b6d69ddd81d67ce9914453.tar.gz linux-stable-8742beb50f2db903d3b6d69ddd81d67ce9914453.tar.bz2 linux-stable-8742beb50f2db903d3b6d69ddd81d67ce9914453.zip |
net: phy: Fix the issue that netif always links up after resuming
Even though the link is down before entering hibernation,
there is an issue that the network interface always links up after resuming
from hibernation.
If the link is still down before enabling the network interface,
and after resuming from hibernation, the phydev->state is forcibly set
to PHY_UP in mdio_bus_phy_restore(), and the link becomes up.
In suspend sequence, only if the PHY is attached, mdio_bus_phy_suspend()
calls phy_stop_machine(), and mdio_bus_phy_resume() calls
phy_start_machine().
In resume sequence, it's enough to do the same as mdio_bus_phy_resume()
because the state has been preserved.
This patch fixes the issue by calling phy_start_machine() in
mdio_bus_phy_restore() in the same way as mdio_bus_phy_resume().
Fixes: bc87922ff59d ("phy: Move PHY PM operations into phy_device")
Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netfront.c')
0 files changed, 0 insertions, 0 deletions