Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d5bc781 authored by Florian Fainelli's avatar Florian Fainelli Committed by Greg Kroah-Hartman
Browse files

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



[ Upstream commit 5371bbf4b295eea334ed453efa286afa2c3ccff3 ]

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 03e9554a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3402,6 +3402,7 @@ static int bcmgenet_suspend(struct device *d)

	bcmgenet_netif_stop(dev);

	if (!device_may_wakeup(d))
		phy_suspend(priv->phydev);

	netif_device_detach(dev);
@@ -3499,6 +3500,7 @@ static int bcmgenet_resume(struct device *d)

	netif_device_attach(dev);

	if (!device_may_wakeup(d))
		phy_resume(priv->phydev);

	if (priv->eee.eee_enabled)