Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jagan Teki <jagan@amarulasolutions.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"Andrew F. Davis" <afd@ti.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org,
	Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Fabio Estevam <festevam@gmail.com>
Subject: Re: PHY issue with SJA1105Q/DP84849I Design
Date: Tue, 26 Dec 2023 19:05:09 +0200	[thread overview]
Message-ID: <20231226170509.vysmvg6soz54xekb@skbuf> (raw)
In-Reply-To: <f7b894d0-9378-4c4d-8a3e-e35bb9593c72@lunn.ch>

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.

  reply	other threads:[~2023-12-26 17:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20  7:19 PHY issue with SJA1105Q/DP84849I Design Jagan Teki
2023-12-22 14:51 ` Vladimir Oltean
2023-12-26  7:41   ` Jagan Teki
2023-12-26 15:30     ` Vladimir Oltean
2023-12-26 16:49       ` Andrew Lunn
2023-12-26 17:00       ` Andrew Lunn
2023-12-26 17:05         ` Vladimir Oltean [this message]
2023-12-29 11:42       ` Jagan Teki
2023-12-29 15:25         ` Vladimir Oltean
2023-12-29 20:18           ` Jagan Teki
2023-12-29 21:43             ` Andrew Lunn
2023-12-30 11:28             ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231226170509.vysmvg6soz54xekb@skbuf \
    --to=olteanv@gmail.com \
    --cc=afd@ti.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=jagan@amarulasolutions.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@amarulasolutions.com \
    --cc=netdev@vger.kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox