[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bc4d6d4a-ea6a-4b06-865b-f521d0a91e08@lunn.ch>
Date: Mon, 8 Sep 2025 14:16:58 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Rosen Penev <rosenp@...il.com>
Cc: netdev@...r.kernel.org, Horatiu Vultur <horatiu.vultur@...rochip.com>,
"maintainer:MICROCHIP LAN966X ETHERNET DRIVER" <UNGLinuxDriver@...rochip.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: lan966x: enforce phy-mode presence
On Thu, Sep 04, 2025 at 02:27:47PM -0700, Rosen Penev wrote:
> On Thu, Sep 4, 2025 at 2:02 PM Andrew Lunn <andrew@...n.ch> wrote:
> >
> > On Thu, Sep 04, 2025 at 01:38:34PM -0700, Rosen Penev wrote:
> > > The documentation for lan966x states that phy-mode is a required
> > > property but the code does not enforce this. Add an error check.
> > >
> > > Fixes: db8bcaad5393 ("net: lan966x: add the basic lan966x driver")
> > > Signed-off-by: Rosen Penev <rosenp@...il.com>
> > > ---
> > > drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> > > index 7001584f1b7a..5d28710f4fd2 100644
> > > --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> > > +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> > > @@ -1199,6 +1199,9 @@ static int lan966x_probe(struct platform_device *pdev)
> > > continue;
> > >
> > > phy_mode = fwnode_get_phy_mode(portnp);
> > > + if (phy_mode)
> > > + goto cleanup_ports;
> >
> > I think a dev_err_probe() would be good here to give a clue why the
> > interfce failed to prove.
> Probably. Although there are no other error messages in the surrounding code.
lan966x_probe() has 8 error messages.
Andrew
Powered by blists - more mailing lists