[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d89cb3a7-3a55-4bdf-805a-b3386572b220@bootlin.com>
Date: Tue, 13 Jan 2026 09:16:29 +0100
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Andrew Lunn <andrew+netdev@...n.ch>, davem@...emloft.net,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Pei Xiao <xiaopei01@...inos.cn>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Russell King <linux@...linux.org.uk>
Cc: netdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com,
Dan Carpenter <dan.carpenter@...aro.org>, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH net] net: freescale: ucc_geth: Return early when TBI found
can't be found
Hi,
On 13/01/2026 08:43, Maxime Chevallier wrote:
> In ucc_geth's .mac_config(), we configure the TBI 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@...el.com>
> Reported-by: Dan Carpenter <dan.carpenter@...aro.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@...tlin.com>
Heh that's what I get from sending patches while having mild fever, the
patch title is all wrong and should be :
net: freescale: ucc_geth: Return early when TBI PHY can't be found
I'll wait for the 24h cooldown, grab some honey + milk and resend after :)
Maxime
> ---
> 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 */
Powered by blists - more mailing lists