Commit 12f0bffc authored by Florian Fainelli's avatar Florian Fainelli Committed by Greg Kroah-Hartman

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

[ Upstream commit 5371bbf4 ]

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b362d673
...@@ -3495,6 +3495,7 @@ static int bcmgenet_suspend(struct device *d) ...@@ -3495,6 +3495,7 @@ static int bcmgenet_suspend(struct device *d)
bcmgenet_netif_stop(dev); bcmgenet_netif_stop(dev);
if (!device_may_wakeup(d))
phy_suspend(priv->phydev); phy_suspend(priv->phydev);
netif_device_detach(dev); netif_device_detach(dev);
...@@ -3592,6 +3593,7 @@ static int bcmgenet_resume(struct device *d) ...@@ -3592,6 +3593,7 @@ static int bcmgenet_resume(struct device *d)
netif_device_attach(dev); netif_device_attach(dev);
if (!device_may_wakeup(d))
phy_resume(priv->phydev); phy_resume(priv->phydev);
if (priv->eee.eee_enabled) if (priv->eee.eee_enabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment