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: <aLDR4pRjJkMsSGQ7@pidgin.makrotopia.org>
Date: Thu, 28 Aug 2025 23:02:10 +0100
From: Daniel Golle <daniel@...rotopia.org>
To: Vladimir Oltean <olteanv@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Hauke Mehrtens <hauke@...ke-m.de>,
	Russell King <linux@...linux.org.uk>, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, Andreas Schirm <andreas.schirm@...mens.com>,
	Lukas Stockmann <lukas.stockmann@...mens.com>,
	Alexander Sverdlin <alexander.sverdlin@...mens.com>,
	Peter Christen <peter.christen@...mens.com>,
	Avinash Jayaraman <ajayaraman@...linear.com>,
	Bing tao Xu <bxu@...linear.com>, Liang Xu <lxu@...linear.com>,
	Juraj Povazanec <jpovazanec@...linear.com>,
	"Fanni (Fang-Yi) Chan" <fchan@...linear.com>,
	"Benny (Ying-Tsan) Weng" <yweng@...linear.com>,
	"Livia M. Rosu" <lrosu@...linear.com>,
	John Crispin <john@...ozen.org>
Subject: Re: [PATCH net-next v2 3/6] net: dsa: lantiq_gswip: ignore SerDes
 modes in phylink_mac_config()

On Thu, Aug 28, 2025 at 11:39:35PM +0300, Vladimir Oltean wrote:
> On Wed, Aug 27, 2025 at 12:06:03AM +0100, Daniel Golle wrote:
> > We can safely ignore SerDes interface modes 1000Base-X, 2500Base-X and
> > SGMII in phylink_mac_config() as they are being taken care of by the
> > PCS.
> > 
> > Signed-off-by: Daniel Golle <daniel@...rotopia.org>
> > ---
> > v2: no changes
> > 
> >  drivers/net/dsa/lantiq/lantiq_gswip.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/net/dsa/lantiq/lantiq_gswip.c b/drivers/net/dsa/lantiq/lantiq_gswip.c
> > index acb6996356e9..3e2a54569828 100644
> > --- a/drivers/net/dsa/lantiq/lantiq_gswip.c
> > +++ b/drivers/net/dsa/lantiq/lantiq_gswip.c
> > @@ -1444,6 +1444,10 @@ static void gswip_phylink_mac_config(struct phylink_config *config,
> >  	miicfg |= GSWIP_MII_CFG_LDCLKDIS;
> >  
> >  	switch (state->interface) {
> > +	case PHY_INTERFACE_MODE_SGMII:
> > +	case PHY_INTERFACE_MODE_1000BASEX:
> > +	case PHY_INTERFACE_MODE_2500BASEX:
> > +		return;
> >  	case PHY_INTERFACE_MODE_MII:
> >  	case PHY_INTERFACE_MODE_INTERNAL:
> >  		miicfg |= GSWIP_MII_CFG_MODE_MIIM;
> > -- 
> > 2.51.0
> 
> Is "miicfg" irrelevant in these 3 modes? Doesn't it have to be set to
> GSWIP_MII_CFG_MODE_GMII?

The function is basically already a no-op for SGMII ports for which
there isn't a GSWIP_MII_CFG register (ie. gswip_mii_mask_cfg() will
just return and do nothing). The same is true for gswip_mii_mask_pcdu(),
so what is left is just the printing of the error message
"Unsupported interface: ...", which is misleading (and could maybe be
removed completely now that I think about it as phylink_get_caps() should
already make sure that phylink_mac_config() only gets called with a
supported interface mode).


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ