[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231226170509.vysmvg6soz54xekb@skbuf>
Date: Tue, 26 Dec 2023 19:05:09 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Jagan Teki <jagan@...rulasolutions.com>,
Heiner Kallweit <hkallweit1@...il.com>,
"Andrew F. Davis" <afd@...com>,
Florian Fainelli <f.fainelli@...il.com>,
linux-kernel <linux-kernel@...r.kernel.org>, netdev@...r.kernel.org,
Michael Nazzareno Trimarchi <michael@...rulasolutions.com>,
Ioana Ciornei <ioana.ciornei@....com>,
Shawn Guo <shawnguo@...nel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Fabio Estevam <festevam@...il.com>
Subject: Re: PHY issue with SJA1105Q/DP84849I Design
On Tue, Dec 26, 2023 at 06:00:17PM +0100, Andrew Lunn wrote:
> > The code which should have prevented this from happening is in
> > phy_attach_direct():
> >
> > if (phydev->attached_dev) {
> > dev_err(&dev->dev, "PHY already attached\n");
> > err = -EBUSY;
> > goto error;
> > }
>
> The problem might be dsa_shared_port_phylink_register():
>
> err = phylink_of_phy_connect(dp->pl, port_dn, 0);
> if (err && err != -ENODEV) {
> pr_err("could not attach to PHY: %d\n", err);
> goto err_phy_connect;
> }
>
> return 0;
>
> Since it is not -ENODEV, it just keep going.
>
> Andrew
"Shared" ports are DSA and CPU ports, the report is on a user port.
There, if phylink_of_phy_connect() fails, we try dsa_user_phy_connect(),
but only if the driver provides a ds->user_mii_bus, which sja1105 does not.
So the failure should be nice and clean. It might be worth posting a
full boot log though, since this is really strange.
Powered by blists - more mailing lists