netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: davem@davemloft.net, "Andrew Lunn" <andrew@lunn.ch>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, "Simon Horman" <horms@kernel.org>,
	"Alexis Lothoré" <alexis.lothore@bootlin.com>
Subject: Re: [PATCH net 2/3] net: stmmac: socfpga: Don't check for phy to enable the SGMII adapter
Date: Tue, 22 Apr 2025 13:54:15 +0200	[thread overview]
Message-ID: <20250422135415.1edd6636@fedora.home> (raw)
In-Reply-To: <aAduzwMTLvaeyQkb@shell.armlinux.org.uk>

Hi Russell,

On Tue, 22 Apr 2025 11:26:23 +0100
"Russell King (Oracle)" <linux@armlinux.org.uk> wrote:

> On Tue, Apr 22, 2025 at 11:46:56AM +0200, Maxime Chevallier wrote:
> > The SGMII adapter needs to be enabled for both Cisco SGMII and 1000BaseX
> > operations. It doesn't make sense to check for an attached phydev here,
> > as we simply might not have any, in particular if we're using the
> > 1000BaseX interface mode.
> > 
> > So, check only for the presence of a SGMII adapter to re-enable it after
> > a link config.  
> 
> I wonder whether:
> 
> 	struct stmmac_priv *priv = netdev_priv(dev_get_drvdata(dwmac->dev));
> 
> 	if ((priv->plat->phy_interface == PHY_INTERFACE_MODE_SGMII ||
> 	     priv->plat->phy_interface == PHY_INTERFACE_MODE_1000BASEX) &&
> 	    sgmii_adapter_base)
>  		writew(SGMII_ADAPTER_ENABLE,
>  		       sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
> 
> would describe the required functionality here better, making it clear
> under which interface modes we expect to set the enable bits.

That's true indeed. Thanks for the suggestion, I'll include that in V2
with your suggested-by :)

Thanks,

Maxime



  reply	other threads:[~2025-04-22 11:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22  9:46 [PATCH net 0/3] net: stmmac: socfpga: 1000BaseX support and cleanups Maxime Chevallier
2025-04-22  9:46 ` [PATCH net 1/3] net: stmmac: socfpga: Enable internal GMII when using 1000BaseX Maxime Chevallier
2025-04-22 10:23   ` Russell King (Oracle)
2025-04-22  9:46 ` [PATCH net 2/3] net: stmmac: socfpga: Don't check for phy to enable the SGMII adapter Maxime Chevallier
2025-04-22 10:26   ` Russell King (Oracle)
2025-04-22 11:54     ` Maxime Chevallier [this message]
2025-04-22  9:46 ` [PATCH net 3/3] net: stmmac: socfpga: Remove unused pcs-mdiodev field Maxime Chevallier
2025-04-22 10:26   ` Russell King (Oracle)

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=20250422135415.1edd6636@fedora.home \
    --to=maxime.chevallier@bootlin.com \
    --cc=alexis.lothore@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).