[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50d318fd-a82c-4756-a349-682b867c0b8b@lunn.ch>
Date: Tue, 28 Nov 2023 17:37:30 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
linux-arm-kernel@...ts.infradead.org,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Simon Horman <horms@...nel.org>,
linux-stm32@...md-mailman.stormreply.com,
alexis.lothore@...tlin.com
Subject: Re: [PATCH net] net: stmmac: dwmac-socfpga: Don't access SGMII
adapter when not available
On Tue, Nov 28, 2023 at 10:45:37AM +0100, Maxime Chevallier wrote:
> The SGMII adapter isn't present on all dwmac-socfpga implementations.
> Make sure we don't try to configure it if we don't have this adapter.
If it does not exist, why even try to call socfpga_sgmii_config()?
It seems like this test needs moving up the call stack. socfpga_gen5_set_phy_mode():
if (phymode == PHY_INTERFACE_MODE_SGMII)
if (dwmac->sgmii_adapter_base)
socfpga_sgmii_config(dwmac, true);
else
return -EINVAL;
Same in socfpga_gen10_set_phy_mode()?
Andrew
Powered by blists - more mailing lists