net: phy: fix MDIO bus PM PHY resuming
So far we have the unfortunate situation that mdio_bus_phy_may_suspend()
is called in suspend AND resume path, assuming that function result is
the same. After the original change this is no longer the case,
resulting in broken resume as reported by Geert.
To fix this call mdio_bus_phy_may_suspend() in the suspend path only,
and let the phy_device store the info whether it was suspended by
MDIO bus PM.
Fixes: 503ba7c69610 ("net: phy: Avoid multiple suspends")
Reported-by: Geert Uytterhoeven <email@example.com>
Tested-by: Geert Uytterhoeven <firstname.lastname@example.org>
Signed-off-by: Heiner Kallweit <email@example.com>
Reviewed-by: Florian Fainelli <firstname.lastname@example.org>
Signed-off-by: David S. Miller <email@example.com>
2 files changed