From: Romain Gantois <romain.gantois@bootlin.com>
To: "Russell King" <linux@armlinux.org.uk>,
"Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Jose Abreu" <joabreu@synopsys.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Clément Léger" <clement.leger@bootlin.com>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
netdev@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-renesas-soc@vger.kernel.org,
Romain Gantois <romain.gantois@bootlin.com>
Subject: [PATCH net-next v2 3/7] net: stmmac: don't rely on lynx_pcs presence to check for a PHY
Date: Tue, 30 Jan 2024 10:28:38 +0100 [thread overview]
Message-ID: <20240130-rxc_bugfix-v2-3-5e6c3168e5f0@bootlin.com> (raw)
In-Reply-To: <20240130-rxc_bugfix-v2-0-5e6c3168e5f0@bootlin.com>
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
When initializing attached PHYs, there are some cases where we don't expect
any PHY to be connected. The logic uses conditions based on various local
PCS configuration, but also calls-in phylink_expects_phy() via
stmmac_init_phy(), which is enough to ensure we don't try to initialize a
PHY when using a Lynx PCS, as long as we have the phy_interface set to a
802.3z mode and are using inband negociation.
Drop the lynx check, making the stmmac generic code more pcs_lynx-agnostic.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
[rgantois: commit log]
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b334eb16da23..7f0900f53248 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3918,8 +3918,7 @@ static int __stmmac_open(struct net_device *dev,
if (priv->hw->pcs != STMMAC_PCS_TBI &&
priv->hw->pcs != STMMAC_PCS_RTBI &&
(!priv->hw->xpcs ||
- xpcs_get_an_mode(priv->hw->xpcs, mode) != DW_AN_C73) &&
- !priv->hw->lynx_pcs) {
+ xpcs_get_an_mode(priv->hw->xpcs, mode) != DW_AN_C73)) {
ret = stmmac_init_phy(dev);
if (ret) {
netdev_err(priv->dev,
--
2.43.0
next prev parent reply other threads:[~2024-01-30 9:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 9:28 [PATCH net-next v2 0/7] Fix missing PHY-to-MAC RX clock Romain Gantois
2024-01-30 9:28 ` [PATCH net-next v2 1/7] net: phy: add PHY_F_RXC_ALWAYS_ON to PHY dev flags Romain Gantois
2024-01-30 9:57 ` Russell King (Oracle)
2024-01-30 13:55 ` Andrew Lunn
2024-01-30 14:02 ` Russell King (Oracle)
2024-01-31 13:53 ` Andrew Lunn
2024-01-30 9:28 ` [PATCH net-next v2 2/7] net: phy: add rxc_always_on flag to phylink_pcs Romain Gantois
2024-01-30 10:11 ` Russell King (Oracle)
2024-01-30 13:40 ` Romain Gantois
2024-01-30 9:28 ` Romain Gantois [this message]
2024-01-30 9:28 ` [PATCH net-next v2 4/7] net: stmmac: Support a generic PCS field in mac_device_info Romain Gantois
2024-01-30 9:28 ` [PATCH net-next v2 5/7] net: stmmac: Signal to PHY/PCS drivers to keep RX clock on Romain Gantois
2024-01-30 9:28 ` [PATCH net-next v2 6/7] net: phy: at803x: Avoid hibernating if MAC requires RX clock Romain Gantois
2024-01-30 9:28 ` [PATCH net-next v2 7/7] net: pcs: rzn1-miic: Init RX clock early if MAC requires it Romain Gantois
2024-01-30 9:58 ` [PATCH net-next v2 0/7] Fix missing PHY-to-MAC RX clock Maxime Chevallier
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=20240130-rxc_bugfix-v2-3-5e6c3168e5f0@bootlin.com \
--to=romain.gantois@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=clement.leger@bootlin.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=miquel.raynal@bootlin.com \
--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).