Skip to content

Commit

Permalink
net: bcmgenet: Do not suspend PHY if Wake-on-LAN is enabled
Browse files Browse the repository at this point in the history
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: cc013fb ("net: bcmgenet: correctly suspend and resume PHY device")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Mar 15, 2017
1 parent 88d339e commit 5371bbf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/broadcom/genet/bcmgenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5371bbf

Please sign in to comment.