linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
@ 2021-08-23 14:37 Michael Riesch
  2021-08-23 16:44 ` Jakub Kicinski
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ 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


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 16+ messages in thread
[parent not found: <CAGjnhw920kNaJ9Vkg54WR8vh2TaomuTtA3WwR3eieD4v6iEJDw@mail.gmail.com>]

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

Thread overview: 16+ 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 16:44 ` Jakub Kicinski
2021-08-25  8:07   ` Michael Riesch
2021-08-25  9:50 ` patchwork-bot+netdevbpf
2021-08-29 17:48 ` Chen-Yu Tsai
2021-08-30  7:57   ` Michael Riesch
2021-08-30 13:49     ` Punit Agrawal
2021-08-30 14:10       ` Michael Riesch
2021-09-17  2:22         ` Qu Wenruo
2021-09-17  7:18           ` Punit Agrawal
2021-09-17  8:02             ` Qu Wenruo
2021-09-17 15:11               ` Punit Agrawal
2021-08-30 16:03     ` Chen-Yu Tsai
2021-08-30 19:22     ` Sasha Levin
     [not found] <CAGjnhw920kNaJ9Vkg54WR8vh2TaomuTtA3WwR3eieD4v6iEJDw@mail.gmail.com>
2021-09-14 10:06 ` Michael Riesch
2021-09-14 13:39   ` Sebastian Döring

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