lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z87HkcdK2QTjooDK@shell.armlinux.org.uk>
Date: Mon, 10 Mar 2025 11:05:53 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	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>,
	Vladimir Oltean <olteanv@...il.com>,
	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Maxime Chevallier <maxime.chevallier@...tlin.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org,
	upstream@...oha.com
Subject: Re: [net-next PATCH v12 12/13] net: dsa: Add Airoha AN8855 5-Port
 Gigabit DSA Switch driver

On Mon, Mar 10, 2025 at 11:57:41AM +0100, Christian Marangi wrote:
> > > +static int an8855_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
> > > +			     phy_interface_t interface,
> > > +			     const unsigned long *advertising,
> > > +			     bool permit_pause_to_mac)
> > > +{
> > > +	struct an8855_priv *priv = container_of(pcs, struct an8855_priv, pcs);
> > > +	u32 val;
> > > +	int ret;
> > > +
> > > +	/*                   !!! WELCOME TO HELL !!!                   */
> > > +
> > [... hell ...]
> 
> Will drop :( It was an easter egg for the 300 lines to configure PCS.

That wasn't a request to drop the comment, just that I didn't want to
include all that in my reply.

> > I guess, however, that as you're only using SGMII with in-band, it
> > probably doesn't make much difference, but having similar behaviour
> > in the various drivers helps with ongoing maintenance.
> 
> Do we have some driver that implement the logic of skipping the bulk of
> configuration if the mode doesn't change?

For many, it doesn't matter, but for e.g. xpcs, there may be a reset
of the XPCS when the mode changes, and there's workarounds for the
TXGBE - both of those only happen when the interface mode actually
changes.

Re-reading my .pcs_config() documentation, I really ought to mention
that .pcs_config() will be called for both interface mode changes and
for advertisement changes, and should not disrupt the link when
nothing has changed.

-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ