linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: stmmac: fix failed to suspend if phy based WOL is enabled
@ 2020-08-03  8:56 Jisheng Zhang
  2020-08-04  0:59 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2020-08-03  8:56 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-kernel, linux-arm-kernel

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>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 05d63963fdb7..ac5e8cc5fb9f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -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;
 	}
 
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: stmmac: fix failed to suspend if phy based WOL is enabled
  2020-08-03  8:56 [PATCH net-next] net: stmmac: fix failed to suspend if phy based WOL is enabled Jisheng Zhang
@ 2020-08-04  0:59 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-08-04  0:59 UTC (permalink / raw)
  To: Jisheng.Zhang
  Cc: alexandre.torgue, netdev, linux-kernel, joabreu, mcoquelin.stm32,
	kuba, peppe.cavallaro, linux-arm-kernel

From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Date: Mon, 3 Aug 2020 16:56:47 +0800

> 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>

Applied.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-04  1:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03  8:56 [PATCH net-next] net: stmmac: fix failed to suspend if phy based WOL is enabled Jisheng Zhang
2020-08-04  0:59 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).