Skip to content

Commit aec3f41

Browse files
punitagrawalkuba-moo
authored andcommitted
net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices
Commit 2d26f6e ("net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings") while getting rid of a runtime PM warning ended up breaking ethernet on rk3399 based devices. By dropping an extra reference to the device, the commit ends up enabling suspend / resume of the ethernet device - which appears to be broken. While the issue with runtime pm is being investigated, partially revert commit 2d26f6e to restore the network on rk3399. Fixes: 2d26f6e ("net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings") Suggested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Punit Agrawal <punitagrawal@gmail.com> Cc: Michael Riesch <michael.riesch@wolfvision.net> Tested-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20210929135049.3426058-1-punitagrawal@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 019d932 commit aec3f41

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/delay.h>
2222
#include <linux/mfd/syscon.h>
2323
#include <linux/regmap.h>
24+
#include <linux/pm_runtime.h>
2425

2526
#include "stmmac_platform.h"
2627

@@ -1528,6 +1529,8 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
15281529
return ret;
15291530
}
15301531

1532+
pm_runtime_get_sync(dev);
1533+
15311534
if (bsp_priv->integrated_phy)
15321535
rk_gmac_integrated_phy_powerup(bsp_priv);
15331536

@@ -1539,6 +1542,8 @@ static void rk_gmac_powerdown(struct rk_priv_data *gmac)
15391542
if (gmac->integrated_phy)
15401543
rk_gmac_integrated_phy_powerdown(gmac);
15411544

1545+
pm_runtime_put_sync(&gmac->pdev->dev);
1546+
15421547
phy_power_on(gmac, false);
15431548
gmac_clk_enable(gmac, false);
15441549
}

0 commit comments

Comments
 (0)