From: Punit Agrawal <punitagrawal@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, davem@davemloft.net,
peppe.cavallaro@st.com, alexandre.torgue@foss.st.com,
kuba@kernel.org, Punit Agrawal <punitagrawal@gmail.com>,
Heiko Stuebner <heiko@sntech.de>,
Michael Riesch <michael.riesch@wolfvision.net>
Subject: [PATCH] net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices
Date: Wed, 29 Sep 2021 22:50:49 +0900 [thread overview]
Message-ID: <20210929135049.3426058-1-punitagrawal@gmail.com> (raw)
Commit 2d26f6e39afb ("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 2d26f6e39afb to restore the network on rk3399.
Fixes: 2d26f6e39afb ("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>
---
Hi,
There's been a few reports of broken ethernet on rk3399 based
boards. The issue got introduced due to a late commit in the 5.14
cycle.
It would be great if this commit can be taken as a fix for the next rc
as well as applied to the 5.14 stable releases.
Thanks,
Punit
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index ed817011a94a..6924a6aacbd5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -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,8 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
return ret;
}
+ pm_runtime_get_sync(dev);
+
if (bsp_priv->integrated_phy)
rk_gmac_integrated_phy_powerup(bsp_priv);
@@ -1539,6 +1542,8 @@ static void rk_gmac_powerdown(struct rk_priv_data *gmac)
if (gmac->integrated_phy)
rk_gmac_integrated_phy_powerdown(gmac);
+ pm_runtime_put_sync(&gmac->pdev->dev);
+
phy_power_on(gmac, false);
gmac_clk_enable(gmac, false);
}
--
2.32.0
WARNING: multiple messages have this Message-ID (diff)
From: Punit Agrawal <punitagrawal@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, davem@davemloft.net,
peppe.cavallaro@st.com, alexandre.torgue@foss.st.com,
kuba@kernel.org, Punit Agrawal <punitagrawal@gmail.com>,
Heiko Stuebner <heiko@sntech.de>,
Michael Riesch <michael.riesch@wolfvision.net>
Subject: [PATCH] net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices
Date: Wed, 29 Sep 2021 22:50:49 +0900 [thread overview]
Message-ID: <20210929135049.3426058-1-punitagrawal@gmail.com> (raw)
Commit 2d26f6e39afb ("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 2d26f6e39afb to restore the network on rk3399.
Fixes: 2d26f6e39afb ("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>
---
Hi,
There's been a few reports of broken ethernet on rk3399 based
boards. The issue got introduced due to a late commit in the 5.14
cycle.
It would be great if this commit can be taken as a fix for the next rc
as well as applied to the 5.14 stable releases.
Thanks,
Punit
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index ed817011a94a..6924a6aacbd5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -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,8 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
return ret;
}
+ pm_runtime_get_sync(dev);
+
if (bsp_priv->integrated_phy)
rk_gmac_integrated_phy_powerup(bsp_priv);
@@ -1539,6 +1542,8 @@ static void rk_gmac_powerdown(struct rk_priv_data *gmac)
if (gmac->integrated_phy)
rk_gmac_integrated_phy_powerdown(gmac);
+ pm_runtime_put_sync(&gmac->pdev->dev);
+
phy_power_on(gmac, false);
gmac_clk_enable(gmac, false);
}
--
2.32.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Punit Agrawal <punitagrawal@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, davem@davemloft.net,
peppe.cavallaro@st.com, alexandre.torgue@foss.st.com,
kuba@kernel.org, Punit Agrawal <punitagrawal@gmail.com>,
Heiko Stuebner <heiko@sntech.de>,
Michael Riesch <michael.riesch@wolfvision.net>
Subject: [PATCH] net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices
Date: Wed, 29 Sep 2021 22:50:49 +0900 [thread overview]
Message-ID: <20210929135049.3426058-1-punitagrawal@gmail.com> (raw)
Commit 2d26f6e39afb ("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 2d26f6e39afb to restore the network on rk3399.
Fixes: 2d26f6e39afb ("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>
---
Hi,
There's been a few reports of broken ethernet on rk3399 based
boards. The issue got introduced due to a late commit in the 5.14
cycle.
It would be great if this commit can be taken as a fix for the next rc
as well as applied to the 5.14 stable releases.
Thanks,
Punit
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index ed817011a94a..6924a6aacbd5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -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,8 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
return ret;
}
+ pm_runtime_get_sync(dev);
+
if (bsp_priv->integrated_phy)
rk_gmac_integrated_phy_powerup(bsp_priv);
@@ -1539,6 +1542,8 @@ static void rk_gmac_powerdown(struct rk_priv_data *gmac)
if (gmac->integrated_phy)
rk_gmac_integrated_phy_powerdown(gmac);
+ pm_runtime_put_sync(&gmac->pdev->dev);
+
phy_power_on(gmac, false);
gmac_clk_enable(gmac, false);
}
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-09-29 13:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 13:50 Punit Agrawal [this message]
2021-09-29 13:50 ` [PATCH] net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices Punit Agrawal
2021-09-29 13:50 ` Punit Agrawal
2021-09-29 21:02 ` Heiko Stübner
2021-09-29 21:02 ` Heiko Stübner
2021-09-29 21:02 ` Heiko Stübner
2021-10-01 23:02 ` Jakub Kicinski
2021-10-01 23:02 ` Jakub Kicinski
2021-10-01 23:02 ` Jakub Kicinski
2021-10-02 21:33 ` Andreas Rammhold
2021-10-02 21:33 ` Andreas Rammhold
2021-10-02 21:33 ` Andreas Rammhold
2021-10-03 0:20 ` Jakub Kicinski
2021-10-03 0:20 ` Jakub Kicinski
2021-10-03 0:20 ` Jakub Kicinski
2021-10-03 0:41 ` Andreas Rammhold
2021-10-03 0:41 ` Andreas Rammhold
2021-10-03 0:41 ` Andreas Rammhold
2021-10-03 9:15 ` Heiko Stübner
2021-10-03 9:15 ` Heiko Stübner
2021-10-03 9:15 ` Heiko Stübner
2021-10-04 12:06 ` Punit Agrawal
2021-10-04 12:06 ` Punit Agrawal
2021-10-04 12:06 ` Punit Agrawal
2021-10-05 9:08 ` andreas
2021-10-05 9:08 ` andreas
2021-10-05 9:08 ` andreas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210929135049.3426058-1-punitagrawal@gmail.com \
--to=punitagrawal@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=davem@davemloft.net \
--cc=heiko@sntech.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=michael.riesch@wolfvision.net \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.