提交 d70c47c8 编写于 作者: H Heiner Kallweit 提交者: David S. Miller

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: NHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5c05c1db
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册