* [PATCH net-next] net: phy: realtek: add error handling to rtl8211f_get_wol
@ 2025-06-24 14:17 Daniel Braunwarth via B4 Relay
2025-06-24 15:35 ` Andrew Lunn
2025-06-26 0:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Braunwarth via B4 Relay @ 2025-06-24 14:17 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jon Hunter
Cc: netdev, linux-kernel, Daniel Braunwarth
From: Daniel Braunwarth <daniel.braunwarth@kuka.com>
We should check if the WOL settings was successfully read from the PHY.
In case this fails we cannot just use the error code and proceed.
Signed-off-by: Daniel Braunwarth <daniel.braunwarth@kuka.com>
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Closes: https://lore.kernel.org/baaa083b-9a69-460f-ab35-2a7cb3246ffd@nvidia.com
---
drivers/net/phy/realtek/realtek_main.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index c3dcb62574303374666b46a454cd4e10de455d24..dd0d675149ad7f9730f04ba1aea82e02b15dfb2c 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -436,9 +436,15 @@ static irqreturn_t rtl8211f_handle_interrupt(struct phy_device *phydev)
static void rtl8211f_get_wol(struct phy_device *dev, struct ethtool_wolinfo *wol)
{
+ int wol_events;
+
wol->supported = WAKE_MAGIC;
- if (phy_read_paged(dev, RTL8211F_WOL_SETTINGS_PAGE, RTL8211F_WOL_SETTINGS_EVENTS)
- & RTL8211F_WOL_EVENT_MAGIC)
+
+ wol_events = phy_read_paged(dev, RTL8211F_WOL_SETTINGS_PAGE, RTL8211F_WOL_SETTINGS_EVENTS);
+ if (wol_events < 0)
+ return;
+
+ if (wol_events & RTL8211F_WOL_EVENT_MAGIC)
wol->wolopts = WAKE_MAGIC;
}
---
base-commit: f817b6dd2b62d921a6cdc0a3ac599cd1851f343c
change-id: 20250624-realtek_fixes-85f292cfc1a4
Best regards,
--
Daniel Braunwarth <daniel.braunwarth@kuka.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phy: realtek: add error handling to rtl8211f_get_wol
2025-06-24 14:17 [PATCH net-next] net: phy: realtek: add error handling to rtl8211f_get_wol Daniel Braunwarth via B4 Relay
@ 2025-06-24 15:35 ` Andrew Lunn
2025-06-26 0:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2025-06-24 15:35 UTC (permalink / raw)
To: daniel.braunwarth
Cc: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Jon Hunter, netdev, linux-kernel
On Tue, Jun 24, 2025 at 04:17:33PM +0200, Daniel Braunwarth via B4 Relay wrote:
> From: Daniel Braunwarth <daniel.braunwarth@kuka.com>
>
> We should check if the WOL settings was successfully read from the PHY.
>
> In case this fails we cannot just use the error code and proceed.
>
> Signed-off-by: Daniel Braunwarth <daniel.braunwarth@kuka.com>
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Closes: https://lore.kernel.org/baaa083b-9a69-460f-ab35-2a7cb3246ffd@nvidia.com
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phy: realtek: add error handling to rtl8211f_get_wol
2025-06-24 14:17 [PATCH net-next] net: phy: realtek: add error handling to rtl8211f_get_wol Daniel Braunwarth via B4 Relay
2025-06-24 15:35 ` Andrew Lunn
@ 2025-06-26 0:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-26 0:50 UTC (permalink / raw)
To: Daniel Braunwarth
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
jonathanh, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 24 Jun 2025 16:17:33 +0200 you wrote:
> From: Daniel Braunwarth <daniel.braunwarth@kuka.com>
>
> We should check if the WOL settings was successfully read from the PHY.
>
> In case this fails we cannot just use the error code and proceed.
>
> Signed-off-by: Daniel Braunwarth <daniel.braunwarth@kuka.com>
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Closes: https://lore.kernel.org/baaa083b-9a69-460f-ab35-2a7cb3246ffd@nvidia.com
>
> [...]
Here is the summary with links:
- [net-next] net: phy: realtek: add error handling to rtl8211f_get_wol
https://git.kernel.org/netdev/net-next/c/a9b24b3583ae
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] 3+ messages in thread
end of thread, other threads:[~2025-06-26 0:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24 14:17 [PATCH net-next] net: phy: realtek: add error handling to rtl8211f_get_wol Daniel Braunwarth via B4 Relay
2025-06-24 15:35 ` Andrew Lunn
2025-06-26 0:50 ` 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).