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: <ZZQDWzYlxAKl0JxI@shell.armlinux.org.uk>
Date: Tue, 2 Jan 2024 12:36:43 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Eric Woudstra <ericwouds@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	Daniel Golle <daniel@...rotopia.org>,
	Frank Wunderlich <frank-w@...lic-files.de>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH RFC net-next] net: phylink: add quirk for disabling
 in-band-status for mediatek pcs at 2500base-x

On Tue, Jan 02, 2024 at 08:43:26AM +0100, Eric Woudstra wrote:
> In follow up to: net: pcs: pcs-mtk-lynxi: use 2500Base-X without AN
> 
> MediaTek LynxI PCS, 2500Base-X will only work without inband status due to
> hardware limitation.

Yes, we need better support for 2500base-X connected to a PHY.
Currently, we treat both base-X interface modes as _media_ side modes
by looking at the Autoneg bit. However, given that 2500base-X has been
around for ages in vendor-specific forms, we need to do better. The
introduction of the PHYLINK_PCS_NEG_* enum and phylink_pcs_neg_mode()
is a step towards resolving this (as well as ensuring consistency of
implementation so we _can_ start to address it in phylink rather than
having different PCS drivers doing weird stuff.)

I am _not_ of the opinion that we should be dealing with this based on
compatibles or anything like that.

As 6.6 was declared LTS, I think we can now move phylink_pcs_neg_mode()
into phylink.c, and thus think about what we should do with:

+               /* 1000base-X is designed for use media-side for Fibre
+                * connections, and thus the Autoneg bit needs to be
+                * taken into account. We also do this for 2500base-X
+                * as well, but drivers may not support this, so may
+                * need to override this.
+                */
+               if (!phylink_autoneg_inband(mode))
+                       neg_mode = PHYLINK_PCS_NEG_OUTBAND;
+               else if (linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
+                                          advertising))
+                       neg_mode = PHYLINK_PCS_NEG_INBAND_ENABLED;
+               else
+                       neg_mode = PHYLINK_PCS_NEG_INBAND_DISABLED;
+               break;

Specifically, the linkmode_test_bit() bit. When there is a PHY present,
the link between the PCS and PHY should _not_ depend on Autoneg as that
is indicates what we want for the _media_ side, and in the case of a
PCS-to-PHY link, that is not the media.

The next issue is the one that you refer to, and there's several issues:

1. some implementations of 2500base-X do not support inband
2. some implementations of 2500base-X appear to require inband
   (e.g. mvneta, mvpp2)

I have some thoughts on this, but I don't have the time to express them
in email at the moment (too much to get through post-Christmas post-
Covid.)

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