Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Yangfl <mmyangfl@gmail.com>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Simon Horman <horms@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v6 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x
Date: Tue, 26 Aug 2025 22:07:17 +0300	[thread overview]
Message-ID: <20250826190717.fkhj3qowvljsuvj6@skbuf> (raw)
In-Reply-To: <CAAXyoMNot+aZ35Xtx=YiTEmGk_c8XT7VGiQ-DUn8T1vPUnO-9Q@mail.gmail.com>

On Mon, Aug 25, 2025 at 10:14:58PM +0800, Yangfl wrote:
> On Mon, Aug 25, 2025 at 2:14 AM Russell King (Oracle)
> <linux@armlinux.org.uk> wrote:
> >
> > On Mon, Aug 25, 2025 at 12:38:20AM +0800, Yangfl wrote:
> > > They are used in phylink_get_caps(), since I don't want to declare a
> > > port which we know it does not exist on some chips. But the info_* set
> > > might be inlined and removed since it is not used elsewhere.
> >
> > The problem is... if you have a port in 0..N that DSA thinks should be
> > used, but is neither internal or external, DSA's initialisation of it
> > will fail, because without any caps declared for it, phylink_create()
> > will return an error, causing dsa_port_phylink_create() to fail,
> > dsa_shared_port_phylink_register() or dsa_user_phy_setup(),
> > dsa_shared_port_link_register_of() or dsa_user_create()... etc. It
> > eventually gets propagated up causing the entire switch probe to fail.
> >
> > Again... read the code!
> 
> What would you expect when you specify Port 0 in DT when only Port 1,
> 3, 8 are available on the chip (YT9213NB)? Probe error.

It depends. Unless the driver has logic which behaves otherwise, the
setup of user ports can fail and DSA will just skip them and bring up
the rest. See commit 86f8b1c01a0a ("net: dsa: Do not make user port
errors fatal"). The shared ports are more important and their setup
failures do lead to a switch setup abort though.

  reply	other threads:[~2025-08-26 19:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-24  0:51 [PATCH net-next v6 0/3] net: dsa: yt921x: Add support for Motorcomm YT921x David Yang
2025-08-24  0:51 ` [PATCH net-next v6 1/3] dt-bindings: net: dsa: yt921x: Add Motorcomm YT921x switch support David Yang
2025-08-24  9:20   ` Krzysztof Kozlowski
2025-08-24  9:25     ` Yangfl
2025-08-24 17:16       ` Krzysztof Kozlowski
2025-08-25  2:39         ` Yangfl
2025-08-25  7:37           ` Krzysztof Kozlowski
2025-08-24  0:51 ` [PATCH net-next v6 2/3] net: dsa: tag_yt921x: add support for Motorcomm YT921x tags David Yang
2025-08-25 22:15   ` Vladimir Oltean
2025-08-26  1:47     ` Yangfl
2025-08-26  2:18       ` Andrew Lunn
2025-08-26  2:44         ` Yangfl
2025-08-26 14:38       ` Vladimir Oltean
2025-08-24  0:51 ` [PATCH net-next v6 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x David Yang
2025-08-24  8:42   ` Russell King (Oracle)
2025-08-24  9:31     ` Yangfl
2025-08-24 15:22   ` Andrew Lunn
2025-08-24 15:26   ` Andrew Lunn
2025-08-24 15:34   ` Andrew Lunn
2025-08-24 15:51   ` Andrew Lunn
2025-08-24 16:38     ` Yangfl
2025-08-24 18:14       ` Russell King (Oracle)
2025-08-24 19:16         ` Andrew Lunn
2025-08-25 14:14         ` Yangfl
2025-08-26 19:07           ` Vladimir Oltean [this message]
2025-08-24 19:14       ` Andrew Lunn
2025-08-24 16:40   ` kernel test robot
2025-08-25 21:23   ` Vladimir Oltean
2025-08-26  5:19     ` Yangfl
2025-08-26 12:15       ` Andrew Lunn
2025-08-26 13:51       ` 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=20250826190717.fkhj3qowvljsuvj6@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@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