[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250422135415.1edd6636@fedora.home>
Date: Tue, 22 Apr 2025 13:54:15 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: davem@...emloft.net, Andrew Lunn <andrew@...n.ch>, Jakub Kicinski
<kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
thomas.petazzoni@...tlin.com, Simon Horman <horms@...nel.org>, Alexis
Lothoré <alexis.lothore@...tlin.com>
Subject: Re: [PATCH net 2/3] net: stmmac: socfpga: Don't check for phy to
enable the SGMII adapter
Hi Russell,
On Tue, 22 Apr 2025 11:26:23 +0100
"Russell King (Oracle)" <linux@...linux.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
Powered by blists - more mailing lists