This is a note to let you know that I've just added the patch titled net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-stmmac-dwmac-rk-fix-unbalanced-pm_runtime_enable-warnings.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Fri Nov 19 02:27:53 PM CET 2021 From: Meng Li <Meng.Li@xxxxxxxxxxxxx> Date: Fri, 19 Nov 2021 10:53:59 +0800 Subject: net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings To: stable@xxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, kuba@xxxxxxxxxx, mcoquelin.stm32@xxxxxxxxx, linux@xxxxxxxxxxxxxxx, andrew@xxxxxxx, qiangqing.zhang@xxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, meng.li@xxxxxxxxxxxxx Message-ID: <20211119025359.30815-7-Meng.Li@xxxxxxxxxxxxx> From: Michael Riesch <michael.riesch@xxxxxxxxxxxxxx> commit 2d26f6e39afb88d32b8f39e76a51b542c3c51674 upstream. 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. Fixes: 5ec55823438e850c91c6b92aec93fb04ebde29e2 ("net: stmmac: add clocks management for gmac driver") Signed-off-by: Michael Riesch <michael.riesch@xxxxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Meng Li <Meng.Li@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 --------- 1 file changed, 9 deletions(-) --- 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" @@ -1336,9 +1335,6 @@ static int rk_gmac_powerup(struct rk_pri return ret; } - pm_runtime_enable(dev); - pm_runtime_get_sync(dev); - if (bsp_priv->integrated_phy) rk_gmac_integrated_phy_powerup(bsp_priv); @@ -1347,14 +1343,9 @@ static int rk_gmac_powerup(struct rk_pri 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); } Patches currently in stable-queue which might be from Meng.Li@xxxxxxxxxxxxx are queue-5.10/net-stmmac-fix-missing-unlock-on-error-in-stmmac_suspend.patch queue-5.10/net-stmmac-fix-system-hang-if-change-mac-address-after-interface-ifdown.patch queue-5.10/net-stmmac-dwmac-rk-fix-unbalanced-pm_runtime_enable-warnings.patch queue-5.10/net-stmmac-fix-issue-where-clk-is-being-unprepared-twice.patch queue-5.10/net-stmmac-add-clocks-management-for-gmac-driver.patch queue-5.10/net-stmmac-platform-fix-build-error-with-config_pm_sleep.patch