* [PATCH net v2] net: freescale: ucc_geth: Return early when TBI PHY can't be found
@ 2026-01-14 8:02 Maxime Chevallier
2026-01-16 4:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Maxime Chevallier @ 2026-01-14 8:02 UTC (permalink / raw)
To: Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Pei Xiao, Christophe Leroy, Russell King
Cc: Maxime Chevallier, netdev, linuxppc-dev, linux-kernel,
thomas.petazzoni, Dan Carpenter, kernel test robot
In ucc_geth's .mac_config(), we configure the TBI Serdes block represented by a
struct phy_device that we get from firmware.
While porting to phylink, a check was missed to make sure we don't try
to access the TBI PHY if we can't get it. Let's add it and return early
in case of error
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202601130843.rFGNXA5a-lkp@intel.com/
Fixes: 53036aa8d031 ("net: freescale: ucc_geth: phylink conversion")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2: Fix commit title, adjust a bit the commit log. No code change.
drivers/net/ethernet/freescale/ucc_geth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index affd5a6c44e7..131d1210dc4a 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -1602,8 +1602,10 @@ static void ugeth_mac_config(struct phylink_config *config, unsigned int mode,
pr_warn("TBI mode requires that the device tree specify a tbi-handle\n");
tbiphy = of_phy_find_device(ug_info->tbi_node);
- if (!tbiphy)
+ if (!tbiphy) {
pr_warn("Could not get TBI device\n");
+ return;
+ }
value = phy_read(tbiphy, ENET_TBI_MII_CR);
value &= ~0x1000; /* Turn off autonegotiation */
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net v2] net: freescale: ucc_geth: Return early when TBI PHY can't be found
2026-01-14 8:02 [PATCH net v2] net: freescale: ucc_geth: Return early when TBI PHY can't be found Maxime Chevallier
@ 2026-01-16 4:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-16 4:20 UTC (permalink / raw)
To: Maxime Chevallier
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, xiaopei01,
christophe.leroy, linux, netdev, linuxppc-dev, linux-kernel,
thomas.petazzoni, dan.carpenter, lkp
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 14 Jan 2026 09:02:46 +0100 you wrote:
> In ucc_geth's .mac_config(), we configure the TBI Serdes block represented by a
> struct phy_device that we get from firmware.
>
> While porting to phylink, a check was missed to make sure we don't try
> to access the TBI PHY if we can't get it. Let's add it and return early
> in case of error
>
> [...]
Here is the summary with links:
- [net,v2] net: freescale: ucc_geth: Return early when TBI PHY can't be found
https://git.kernel.org/netdev/net/c/a74c7a58ca2c
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] 2+ messages in thread
end of thread, other threads:[~2026-01-16 4:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14 8:02 [PATCH net v2] net: freescale: ucc_geth: Return early when TBI PHY can't be found Maxime Chevallier
2026-01-16 4:20 ` 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