All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Andreas Schirm <andreas.schirm@siemens.com>,
	Lukas Stockmann <lukas.stockmann@siemens.com>,
	Alexander Sverdlin <alexander.sverdlin@siemens.com>,
	Peter Christen <peter.christen@siemens.com>,
	Avinash Jayaraman <ajayaraman@maxlinear.com>,
	Bing tao Xu <bxu@maxlinear.com>, Liang Xu <lxu@maxlinear.com>,
	Juraj Povazanec <jpovazanec@maxlinear.com>,
	"Fanni (Fang-Yi) Chan" <fchan@maxlinear.com>,
	"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
	"Livia M. Rosu" <lrosu@maxlinear.com>,
	John Crispin <john@phrozen.org>
Subject: Re: [PATCH net-next v2 3/6] net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config()
Date: Thu, 28 Aug 2025 23:02:10 +0100	[thread overview]
Message-ID: <aLDR4pRjJkMsSGQ7@pidgin.makrotopia.org> (raw)
In-Reply-To: <20250828203935.c46twi4r7qktxaco@skbuf>

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@makrotopia.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).


  reply	other threads:[~2025-08-28 22:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26 23:05 [PATCH net-next v2 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Daniel Golle
2025-08-26 23:05 ` [PATCH net-next v2 1/6] net: dsa: lantiq_gswip: move to dedicated folder Daniel Golle
2025-08-28 20:33   ` Vladimir Oltean
2025-08-28 20:49     ` Hauke Mehrtens
2025-08-28 22:05       ` Daniel Golle
2025-09-03 18:05     ` Daniel Golle
2025-08-26 23:05 ` [PATCH net-next v2 2/6] net: dsa: lantiq_gswip: support model-specific mac_select_pcs() Daniel Golle
2025-08-28 13:05   ` Paolo Abeni
2025-08-26 23:06 ` [PATCH net-next v2 3/6] net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config() Daniel Golle
2025-08-28 20:39   ` Vladimir Oltean
2025-08-28 22:02     ` Daniel Golle [this message]
2025-08-26 23:06 ` [PATCH net-next v2 4/6] net: dsa: lantiq_gswip: support offset of MII registers Daniel Golle
2025-08-28 20:30   ` Hauke Mehrtens
2025-08-26 23:06 ` [PATCH net-next v2 5/6] net: dsa: lantiq_gswip: support standard MDIO node name Daniel Golle
2025-08-26 23:06 ` [PATCH net-next v2 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup() Daniel Golle
2025-08-28 20:24 ` [PATCH net-next v2 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Hauke Mehrtens

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=aLDR4pRjJkMsSGQ7@pidgin.makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=ajayaraman@maxlinear.com \
    --cc=alexander.sverdlin@siemens.com \
    --cc=andreas.schirm@siemens.com \
    --cc=andrew@lunn.ch \
    --cc=bxu@maxlinear.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fchan@maxlinear.com \
    --cc=hauke@hauke-m.de \
    --cc=john@phrozen.org \
    --cc=jpovazanec@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lrosu@maxlinear.com \
    --cc=lukas.stockmann@siemens.com \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=peter.christen@siemens.com \
    --cc=yweng@maxlinear.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.