mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 18:46:53 +07:00
net: phy: make phy_suspend a no-op if PHY is suspended already
Gently handle the case that phy_suspend() is called whilst PHY is in power-down. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5c05c1dbb1
commit
d70c47c8dc
@ -1524,6 +1524,9 @@ int phy_suspend(struct phy_device *phydev)
|
||||
struct phy_driver *phydrv = phydev->drv;
|
||||
int ret;
|
||||
|
||||
if (phydev->suspended)
|
||||
return 0;
|
||||
|
||||
/* If the device has WOL enabled, we cannot suspend the PHY */
|
||||
phy_ethtool_get_wol(phydev, &wol);
|
||||
if (wol.wolopts || (netdev && netdev->wol_enabled))
|
||||
|
Loading…
Reference in New Issue
Block a user