linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: stmmac: mdio: update runtime PM
@ 2025-08-29  9:02 Russell King (Oracle)
  2025-08-29 21:26 ` Jacob Keller
  2025-09-01 20:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2025-08-29  9:02 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
	netdev, Paolo Abeni

Commit 3c7826d0b106 ("net: stmmac: Separate C22 and C45 transactions
for xgmac") missed a change that happened in commit e2d0acd40c87
("net: stmmac: using pm_runtime_resume_and_get instead of
pm_runtime_get_sync").

Update the two clause 45 functions that didn't get switched to
pm_runtime_resume_and_get().

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
I don't have any way to test this on real hardware as the Jetson Xavier
NX doesn't have a C45 PHY.

 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index da4542be756a..0a302b711bc2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -303,11 +303,9 @@ static int stmmac_mdio_read_c45(struct mii_bus *bus, int phyaddr, int devad,
 	u32 value = MII_BUSY;
 	int data = 0;
 
-	data = pm_runtime_get_sync(priv->device);
-	if (data < 0) {
-		pm_runtime_put_noidle(priv->device);
+	data = pm_runtime_resume_and_get(priv->device);
+	if (data < 0)
 		return data;
-	}
 
 	value |= (phyaddr << priv->hw->mii.addr_shift)
 		& priv->hw->mii.addr_mask;
@@ -399,11 +397,9 @@ static int stmmac_mdio_write_c45(struct mii_bus *bus, int phyaddr,
 	int ret, data = phydata;
 	u32 value = MII_BUSY;
 
-	ret = pm_runtime_get_sync(priv->device);
-	if (ret < 0) {
-		pm_runtime_put_noidle(priv->device);
+	ret = pm_runtime_resume_and_get(priv->device);
+	if (ret < 0)
 		return ret;
-	}
 
 	value |= (phyaddr << priv->hw->mii.addr_shift)
 		& priv->hw->mii.addr_mask;
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: stmmac: mdio: update runtime PM
  2025-08-29  9:02 [PATCH net-next] net: stmmac: mdio: update runtime PM Russell King (Oracle)
@ 2025-08-29 21:26 ` Jacob Keller
  2025-09-01 20:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jacob Keller @ 2025-08-29 21:26 UTC (permalink / raw)
  To: Russell King (Oracle), Andrew Lunn, Heiner Kallweit
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
	netdev, Paolo Abeni


[-- Attachment #1.1: Type: text/plain, Size: 521 bytes --]



On 8/29/2025 2:02 AM, Russell King (Oracle) wrote:
> Commit 3c7826d0b106 ("net: stmmac: Separate C22 and C45 transactions
> for xgmac") missed a change that happened in commit e2d0acd40c87
> ("net: stmmac: using pm_runtime_resume_and_get instead of
> pm_runtime_get_sync").
> 
> Update the two clause 45 functions that didn't get switched to
> pm_runtime_resume_and_get().
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: stmmac: mdio: update runtime PM
  2025-08-29  9:02 [PATCH net-next] net: stmmac: mdio: update runtime PM Russell King (Oracle)
  2025-08-29 21:26 ` Jacob Keller
@ 2025-09-01 20:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-01 20:20 UTC (permalink / raw)
  To: Russell King
  Cc: andrew, hkallweit1, alexandre.torgue, andrew+netdev, davem,
	edumazet, kuba, linux-arm-kernel, linux-stm32, mcoquelin.stm32,
	netdev, pabeni

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 29 Aug 2025 10:02:29 +0100 you wrote:
> Commit 3c7826d0b106 ("net: stmmac: Separate C22 and C45 transactions
> for xgmac") missed a change that happened in commit e2d0acd40c87
> ("net: stmmac: using pm_runtime_resume_and_get instead of
> pm_runtime_get_sync").
> 
> Update the two clause 45 functions that didn't get switched to
> pm_runtime_resume_and_get().
> 
> [...]

Here is the summary with links:
  - [net-next] net: stmmac: mdio: update runtime PM
    https://git.kernel.org/netdev/net-next/c/ec0b1eeece28

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-02  0:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29  9:02 [PATCH net-next] net: stmmac: mdio: update runtime PM Russell King (Oracle)
2025-08-29 21:26 ` Jacob Keller
2025-09-01 20:20 ` patchwork-bot+netdevbpf

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).