From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Jon Hunter <jonathanh@nvidia.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Thierry Reding <treding@nvidia.com>
Subject: [PATCH RFC net-next 1/5] net: phylink: add config of PHY receive clock-stop in phylink_resume()
Date: Thu, 27 Feb 2025 14:37:47 +0000 [thread overview]
Message-ID: <E1tnf1H-0056Kz-To@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <Z8B4tVd4nLUKXdQ4@shell.armlinux.org.uk>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/phy/phylink.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index a3b186ab3854..0aae0bb2a254 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -2264,7 +2264,7 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
pl->mac_tx_clk_stop = phy_eee_tx_clock_stop_capable(phy) > 0;
if (pl->mac_supports_eee_ops) {
- /* Explicitly configure whether the PHY is allowed to stop it's
+ /* Explicitly configure whether the PHY is allowed to stop its
* receive clock.
*/
ret = phy_eee_rx_clock_stop(phy,
@@ -2645,8 +2645,22 @@ EXPORT_SYMBOL_GPL(phylink_suspend);
*/
void phylink_resume(struct phylink *pl)
{
+ int ret;
+
ASSERT_RTNL();
+ if (pl->mac_supports_eee_ops && pl->phydev) {
+ /* Explicitly configure whether the PHY is allowed to stop its
+ * receive clock on resume to ensure that it is correctly
+ * configured.
+ */
+ ret = phy_eee_rx_clock_stop(pl->phydev,
+ pl->config->eee_rx_clk_stop_enable);
+ if (ret == -EOPNOTSUPP)
+ phylink_warn(pl, "failed to set rx clock stop: %pe\n",
+ ERR_PTR(ret));
+ }
+
if (test_bit(PHYLINK_DISABLE_MAC_WOL, &pl->phylink_disable_state)) {
/* Wake-on-Lan enabled, MAC handling */
--
2.30.2
next prev parent reply other threads:[~2025-02-27 14:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 14:37 [PATCH RFC 0/5] net: stmmac: fix resume failures due to RX clock Russell King (Oracle)
2025-02-27 14:37 ` Russell King (Oracle) [this message]
2025-02-27 16:39 ` [PATCH RFC net-next 1/5] net: phylink: add config of PHY receive clock-stop in phylink_resume() Andrew Lunn
2025-02-27 14:37 ` [PATCH RFC net-next 2/5] net: phylink: add phylink_prepare_resume() Russell King (Oracle)
2025-02-27 16:40 ` Andrew Lunn
2025-02-27 14:37 ` [PATCH RFC net-next 3/5] net: stmmac: simplify phylink_suspend() and phylink_resume() calls Russell King (Oracle)
2025-02-27 16:45 ` Andrew Lunn
2025-02-27 17:25 ` Russell King (Oracle)
2025-02-27 14:38 ` [PATCH RFC net-next 4/5] net: stmmac: move phylink_resume() after resume setup is complete Russell King (Oracle)
2025-02-27 16:46 ` Andrew Lunn
2025-02-27 14:38 ` [PATCH RFC net-next 5/5] net: stmmac: fix resume when media is in low-power mode Russell King (Oracle)
2025-02-27 16:47 ` Andrew Lunn
2025-03-06 11:30 ` [PATCH RFC 0/5] net: stmmac: fix resume failures due to RX clock Jon Hunter
2025-03-06 15:44 ` Russell King (Oracle)
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=E1tnf1H-0056Kz-To@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=treding@nvidia.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).