[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKtWej0nymW-baTC@shell.armlinux.org.uk>
Date: Sun, 24 Aug 2025 19:14:18 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Yangfl <mmyangfl@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Simon Horman <horms@...nel.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v6 3/3] net: dsa: yt921x: Add support for
Motorcomm YT921x
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!
> > I don't understand the name _burst here? Why is it called
> > that. Looking at other drivers, _u32 would be more common, especially
> > if you have functions to read a _u16, _u8 etc.
>
> They are locked wrappers for their unlocked counterparts. I'd like to
> name the unlocked versions __yt921x_smi_read just like __mdiobus_read,
> but that was turned down in the previous version, so I have to give
> the locked versions a stranger marker since we use unlocked versions
> more often.
Who turned it down, and what reason did they give, given that it's an
established pattern in the phylib, mdiobus and mdiodev APIs.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists