[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAduzwMTLvaeyQkb@shell.armlinux.org.uk>
Date: Tue, 22 Apr 2025 11:26:23 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
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
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.
--
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