]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
net: phy: fix MDIO bus PM PHY resuming
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 12 Mar 2020 21:25:20 +0000 (22:25 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 18 Mar 2020 10:23:23 +0000 (11:23 +0100)
commitae78159507d8048ae182ffab5c32ed12bf96bb1d
treeeea1360f3eaf110bcccf1015104382953d498298
parentd884814a91d056d30225f777ba7830f144ae89e4
net: phy: fix MDIO bus PM PHY resuming

BugLink: https://bugs.launchpad.net/bugs/1867903
[ Upstream commit 611d779af7cad2b87487ff58e4931a90c20b113c ]

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 <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/phy/phy_device.c
include/linux/phy.h