* Create 9999-revert-net-stmmac-dwmac-rk-fix-unbalanced-pm_runtime_enable-warnings.patch
Temporary fix for rk3399 eth issue introduced with 5.14.y
https://forum.armbian.com/topic/18956-hirsute-no-ethernet-after-update/?do=findComment&comment=128876
* wrong archive
* Create revert-fix-unbalanced-pm_runtime_enable-warnings.patch
Reverts 2d26f6e39a
https://forum.armbian.com/topic/18956-hirsute-no-ethernet-after-update/?tab=comments#comment-128877
36 lines
840 B
Diff
36 lines
840 B
Diff
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c 2021-09-12 03:01:00.000000000 -0400
|
|
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c 2021-09-14 07:19:24.402736613 -0400
|
|
@@ -21,6 +21,7 @@
|
|
#include <linux/delay.h>
|
|
#include <linux/mfd/syscon.h>
|
|
#include <linux/regmap.h>
|
|
+#include <linux/pm_runtime.h>
|
|
|
|
#include "stmmac_platform.h"
|
|
|
|
@@ -1528,6 +1529,9 @@
|
|
return ret;
|
|
}
|
|
|
|
+ pm_runtime_enable(dev);
|
|
+ pm_runtime_get_sync(dev);
|
|
+
|
|
if (bsp_priv->integrated_phy)
|
|
rk_gmac_integrated_phy_powerup(bsp_priv);
|
|
|
|
@@ -1536,9 +1540,14 @@
|
|
|
|
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);
|
|
}
|