* [net-next] net: sh_eth: Disable WoL if system can not suspend
@ 2025-09-09 8:58 Niklas Söderlund
2025-09-09 12:39 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Niklas Söderlund @ 2025-09-09 8:58 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-renesas-soc
Cc: Niklas Söderlund
The MAC can't facilitate WoL if the system can't go to sleep. Gate the
WoL support callbacks in ethtool at compile time using CONFIG_PM_SLEEP.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
Hi,
Recent rework of the PM suspend operations by Geert revealed that the
WoL setup code was gated behind CONFIG_PM_SLEEP, but that the driver
still broadcaster support for it.
With the PM suspend operations improved by Geert this just fixes up the
WoL support showed thru ethtool. A system now compiled without
CONFIG_PM_SLEEP gives.
# ethtool -s eth0 wol g
netlink error: Operation not supported
---
drivers/net/ethernet/renesas/sh_eth.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 5a367c5523bb..6fb0ffc1c844 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -2360,6 +2360,7 @@ static int sh_eth_set_ringparam(struct net_device *ndev,
return 0;
}
+#ifdef CONFIG_PM_SLEEP
static void sh_eth_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
{
struct sh_eth_private *mdp = netdev_priv(ndev);
@@ -2386,6 +2387,7 @@ static int sh_eth_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
return 0;
}
+#endif
static const struct ethtool_ops sh_eth_ethtool_ops = {
.get_regs_len = sh_eth_get_regs_len,
@@ -2401,8 +2403,10 @@ static const struct ethtool_ops sh_eth_ethtool_ops = {
.set_ringparam = sh_eth_set_ringparam,
.get_link_ksettings = phy_ethtool_get_link_ksettings,
.set_link_ksettings = phy_ethtool_set_link_ksettings,
+#ifdef CONFIG_PM_SLEEP
.get_wol = sh_eth_get_wol,
.set_wol = sh_eth_set_wol,
+#endif
};
/* network device open function */
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-next] net: sh_eth: Disable WoL if system can not suspend
2025-09-09 8:58 [net-next] net: sh_eth: Disable WoL if system can not suspend Niklas Söderlund
@ 2025-09-09 12:39 ` Andrew Lunn
2025-09-10 11:45 ` Geert Uytterhoeven
2025-09-11 1:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2025-09-09 12:39 UTC (permalink / raw)
To: Niklas Söderlund
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-renesas-soc
On Tue, Sep 09, 2025 at 10:58:49AM +0200, Niklas Söderlund wrote:
> The MAC can't facilitate WoL if the system can't go to sleep. Gate the
> WoL support callbacks in ethtool at compile time using CONFIG_PM_SLEEP.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thanks for doing this.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next] net: sh_eth: Disable WoL if system can not suspend
2025-09-09 8:58 [net-next] net: sh_eth: Disable WoL if system can not suspend Niklas Söderlund
2025-09-09 12:39 ` Andrew Lunn
@ 2025-09-10 11:45 ` Geert Uytterhoeven
2025-09-11 1:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-09-10 11:45 UTC (permalink / raw)
To: Niklas Söderlund
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-renesas-soc
On Tue, 9 Sept 2025 at 18:21, Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> The MAC can't facilitate WoL if the system can't go to sleep. Gate the
> WoL support callbacks in ethtool at compile time using CONFIG_PM_SLEEP.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next] net: sh_eth: Disable WoL if system can not suspend
2025-09-09 8:58 [net-next] net: sh_eth: Disable WoL if system can not suspend Niklas Söderlund
2025-09-09 12:39 ` Andrew Lunn
2025-09-10 11:45 ` Geert Uytterhoeven
@ 2025-09-11 1:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-11 1:10 UTC (permalink / raw)
To: =?utf-8?q?Niklas_S=C3=B6derlund_=3Cniklas=2Esoderlund+renesas=40ragnatech=2E?=,
=?utf-8?q?se=3E?=
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
linux-renesas-soc
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 9 Sep 2025 10:58:49 +0200 you wrote:
> The MAC can't facilitate WoL if the system can't go to sleep. Gate the
> WoL support callbacks in ethtool at compile time using CONFIG_PM_SLEEP.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> Hi,
>
> [...]
Here is the summary with links:
- [net-next] net: sh_eth: Disable WoL if system can not suspend
https://git.kernel.org/netdev/net-next/c/9c02ea544ac3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-11 1:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09 8:58 [net-next] net: sh_eth: Disable WoL if system can not suspend Niklas Söderlund
2025-09-09 12:39 ` Andrew Lunn
2025-09-10 11:45 ` Geert Uytterhoeven
2025-09-11 1:10 ` patchwork-bot+netdevbpf
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).