提交 5371bbf4 编写于 作者: F Florian Fainelli 提交者: David S. Miller

net: bcmgenet: Do not suspend PHY if Wake-on-LAN is enabled

Suspending the PHY would be putting it in a low power state where it
may no longer allow us to do Wake-on-LAN.

Fixes: cc013fb4 ("net: bcmgenet: correctly suspend and resume PHY device")
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 88d339e2
......@@ -3481,7 +3481,8 @@ static int bcmgenet_suspend(struct device *d)
bcmgenet_netif_stop(dev);
phy_suspend(priv->phydev);
if (!device_may_wakeup(d))
phy_suspend(priv->phydev);
netif_device_detach(dev);
......@@ -3578,7 +3579,8 @@ static int bcmgenet_resume(struct device *d)
netif_device_attach(dev);
phy_resume(priv->phydev);
if (!device_may_wakeup(d))
phy_resume(priv->phydev);
if (priv->eee.eee_enabled)
bcmgenet_eee_enable_set(dev, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册