Skip to content

Commit

Permalink
net: stmmac: fix failed to suspend if phy based WOL is enabled
Browse files Browse the repository at this point in the history
With the latest net-next tree, if test suspend/resume after enabling
WOL, we get error as below:

[  487.086365] dpm_run_callback(): mdio_bus_suspend+0x0/0x30 returns -16
[  487.086375] PM: Device stmmac-0:00 failed to suspend: error -16

-16 means -EBUSY, this is because I didn't enable wakeup of the correct
device when implementing phy based WOL feature. To be honest, I caught
the issue when implementing phy based WOL and then fix it locally, but
forgot to amend the phy based wol patch. Today, I found the issue by
testing net-next tree.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jisheng Zhang authored and David S. Miller committed Aug 4, 2020
1 parent 88fab21 commit 01f4d47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
int ret = phylink_ethtool_set_wol(priv->phylink, wol);

if (!ret)
device_set_wakeup_enable(&dev->dev, !!wol->wolopts);
device_set_wakeup_enable(priv->device, !!wol->wolopts);
return ret;
}

Expand Down

0 comments on commit 01f4d47

Please sign in to comment.