mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
net: bcmgenet: Do not suspend PHY if Wake-on-LAN is enabled
[ Upstream commit5371bbf4b2] 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:cc013fb488("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
03e9554ac4
commit
4d5bc781eb
@@ -3402,7 +3402,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);
|
||||
|
||||
@@ -3499,7 +3500,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);
|
||||
|
||||
Reference in New Issue
Block a user