lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <20230404091442.3540092-1-michael.wei.hong.sit@intel.com> Date: Tue, 4 Apr 2023 17:14:42 +0800 From: Michael Sit Wei Hong <michael.wei.hong.sit@...el.com> To: Giuseppe Cavallaro <peppe.cavallaro@...com>, Alexandre Torgue <alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>, "David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>, Ong Boon Leong <boon.leong.ong@...el.com>, netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, linux@...linux.org.uk, hkallweit1@...il.com, andrew@...n.ch, Martin Blumenstingl <martin.blumenstingl@...glemail.com> Cc: Looi Hong Aun <hong.aun.looi@...el.com>, Voon Weifeng <weifeng.voon@...el.com>, Lai Peter Jun Ann <peter.jun.ann.lai@...el.com>, Zulkifli Muhammad Husaini <muhammad.husaini.zulkifli@...el.com>, Tan Tee Min <tee.min.tan@...el.com>, hock.leong.kweh@...el.com Subject: [RFC net 1/1] net: stmmac: skip PHY scanning when PHY already attached in DT mode If PHY is successfully attached during phylink_fwnode_phy_connect() in DT mode. MAC should not need to scan for PHY again. Adding a logic to check if ovr_an_inband is set before scanning for a PHY, since phylink_fwnode_phy_connect() returns 0 when phy_fwnode = fwnode_get_phy_node(fwnode); if (IS_ERR(phy_fwnode)) { if (pl->cfg_link_an_mode == MLO_AN_PHY) return -ENODEV; return 0; } Fixes: fe2cfbc96803 ("net: stmmac: check if MAC needs to attach to a PHY") Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@...el.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index d41a5f92aee7..4b8d3d975678 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1149,7 +1149,7 @@ static int stmmac_init_phy(struct net_device *dev) /* Some DT bindings do not set-up the PHY handle. Let's try to * manually parse it */ - if (!fwnode || phy_needed || ret) { + if (!fwnode || (phy_needed && priv->phylink_config.ovr_an_inband) || ret) { int addr = priv->plat->phy_addr; struct phy_device *phydev; -- 2.34.1
Powered by blists - more mailing lists