All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
@ 2021-08-23 14:37 ` Michael Riesch
  0 siblings, 0 replies; 49+ messages in thread
From: Michael Riesch @ 2021-08-23 14:37 UTC (permalink / raw)
  To: netdev, linux-stm32, linux-rockchip, linux-arm-kernel, linux-kernel
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin,
	Michael Riesch

This reverts commit 2c896fb02e7f65299646f295a007bda043e0f382
"net: stmmac: dwmac-rk: add pd_gmac support for rk3399" and fixes
unbalanced pm_runtime_enable warnings.

In the commit to be reverted, support for power management was
introduced to the Rockchip glue code. Later, power management support
was introduced to the stmmac core code, resulting in multiple
invocations of pm_runtime_{enable,disable,get_sync,put_sync}.

The multiple invocations happen in rk_gmac_powerup and
stmmac_{dvr_probe, resume} as well as in rk_gmac_powerdown and
stmmac_{dvr_remove, suspend}, respectively, which are always called
in conjunction.

Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 280ac0129572..ed817011a94a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -21,7 +21,6 @@
 #include <linux/delay.h>
 #include <linux/mfd/syscon.h>
 #include <linux/regmap.h>
-#include <linux/pm_runtime.h>
 
 #include "stmmac_platform.h"
 
@@ -1529,9 +1528,6 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
 		return ret;
 	}
 
-	pm_runtime_enable(dev);
-	pm_runtime_get_sync(dev);
-
 	if (bsp_priv->integrated_phy)
 		rk_gmac_integrated_phy_powerup(bsp_priv);
 
@@ -1540,14 +1536,9 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
 
 static void rk_gmac_powerdown(struct rk_priv_data *gmac)
 {
-	struct device *dev = &gmac->pdev->dev;
-
 	if (gmac->integrated_phy)
 		rk_gmac_integrated_phy_powerdown(gmac);
 
-	pm_runtime_put_sync(dev);
-	pm_runtime_disable(dev);
-
 	phy_power_on(gmac, false);
 	gmac_clk_enable(gmac, false);
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 49+ messages in thread
* Re: [PATCH] net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
@ 2021-09-14  1:10 Ivan Babrou
  2021-09-14 10:06   ` Michael Riesch
  0 siblings, 1 reply; 49+ messages in thread
From: Ivan Babrou @ 2021-09-14  1:10 UTC (permalink / raw)
  To: sashal
  Cc: alexandre.torgue, davem, joabreu, kuba, linux-arm-kernel,
	linux-kernel, linux-rockchip, linux-stm32, mcoquelin.stm32,
	michael.riesch, netdev, peppe.cavallaro, wens

Is it possible to revert the patch from the 5.14 and 5.15 as well?
I've tried upgrading my rockpro64 board from 5.13 to 5.15-rc1 and
ended up bisecting the issue to this commit like the others. It would
be nice to spare others from this exercise.

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

end of thread, other threads:[~2021-09-17 15:14 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 14:37 [PATCH] net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings Michael Riesch
2021-08-23 14:37 ` Michael Riesch
2021-08-23 14:37 ` Michael Riesch
2021-08-23 16:44 ` Jakub Kicinski
2021-08-23 16:44   ` Jakub Kicinski
2021-08-23 16:44   ` Jakub Kicinski
2021-08-25  8:07   ` Michael Riesch
2021-08-25  8:07     ` Michael Riesch
2021-08-25  8:07     ` Michael Riesch
2021-08-25  9:50 ` patchwork-bot+netdevbpf
2021-08-25  9:50   ` patchwork-bot+netdevbpf
2021-08-25  9:50   ` patchwork-bot+netdevbpf
2021-08-29 17:48 ` Chen-Yu Tsai
2021-08-29 17:48   ` Chen-Yu Tsai
2021-08-29 17:48   ` Chen-Yu Tsai
2021-08-30  7:57   ` Michael Riesch
2021-08-30  7:57     ` Michael Riesch
2021-08-30  7:57     ` Michael Riesch
2021-08-30 13:49     ` Punit Agrawal
2021-08-30 13:49       ` Punit Agrawal
2021-08-30 13:49       ` Punit Agrawal
2021-08-30 14:10       ` Michael Riesch
2021-08-30 14:10         ` Michael Riesch
2021-08-30 14:10         ` Michael Riesch
2021-09-17  2:22         ` Qu Wenruo
2021-09-17  2:22           ` Qu Wenruo
2021-09-17  2:22           ` Qu Wenruo
2021-09-17  7:18           ` Punit Agrawal
2021-09-17  7:18             ` Punit Agrawal
2021-09-17  7:18             ` Punit Agrawal
2021-09-17  8:02             ` Qu Wenruo
2021-09-17  8:02               ` Qu Wenruo
2021-09-17  8:02               ` Qu Wenruo
2021-09-17 15:11               ` Punit Agrawal
2021-09-17 15:11                 ` Punit Agrawal
2021-09-17 15:11                 ` Punit Agrawal
2021-08-30 16:03     ` Chen-Yu Tsai
2021-08-30 16:03       ` Chen-Yu Tsai
2021-08-30 16:03       ` Chen-Yu Tsai
2021-08-30 19:22     ` Sasha Levin
2021-08-30 19:22       ` Sasha Levin
2021-08-30 19:22       ` Sasha Levin
2021-09-14  1:10 Ivan Babrou
2021-09-14 10:06 ` Michael Riesch
2021-09-14 10:06   ` Michael Riesch
2021-09-14 10:06   ` Michael Riesch
2021-09-14 13:39   ` Sebastian Döring
2021-09-14 13:39     ` Sebastian Döring
2021-09-14 13:39     ` Sebastian Döring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.