Use new function phy_stop_suspending() in mdio_bus_phy_suspend() to also disable interrupts and set link state to down.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- v2: - no changes --- drivers/net/phy/phy_device.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index ed97f152..a33dec37 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -139,6 +139,7 @@ static bool mdio_bus_phy_needs_start(struct phy_device *phydev) static int mdio_bus_phy_suspend(struct device *dev) { struct phy_device *phydev = to_phy_device(dev); + int ret = 0; /* We must stop the state machine manually, otherwise it stops out of * control, possibly with the phydev->lock held. Upon resume, netdev @@ -146,9 +147,11 @@ static int mdio_bus_phy_suspend(struct device *dev) * lead to a deadlock. */ if (phydev->attached_dev && phydev->adjust_link) - phy_stop_machine(phydev); + phy_stop_suspending(phydev); + else + ret = phy_suspend(phydev); - return phy_suspend(phydev); + return ret; } static int mdio_bus_phy_resume(struct device *dev) -- 2.16.2