netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: netdev@vger.kernel.org, Punit Agrawal <punitagrawal@gmail.com>
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>,
	Michael Riesch <michael.riesch@wolfvision.net>
Subject: Re: [PATCH] net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices
Date: Wed, 29 Sep 2021 23:02:35 +0200	[thread overview]
Message-ID: <12744188.XEzkDOsqEc@diego> (raw)
In-Reply-To: <20210929135049.3426058-1-punitagrawal@gmail.com>

Am Mittwoch, 29. September 2021, 15:50:49 CEST schrieb Punit Agrawal:
> 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>

On a rk3399-puma which has the described issue,
Tested-by: Heiko Stuebner <heiko@sntech.de>


> ---
> 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);
>  }
> 





  reply	other threads:[~2021-09-30 20:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 13:50 [PATCH] net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices Punit Agrawal
2021-09-29 21:02 ` Heiko Stübner [this message]
2021-10-01 23:02   ` Jakub Kicinski
2021-10-02 21:33     ` Andreas Rammhold
2021-10-03  0:20       ` Jakub Kicinski
2021-10-03  0:41         ` Andreas Rammhold
2021-10-03  9:15           ` Heiko Stübner
2021-10-04 12:06           ` Punit Agrawal
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=12744188.XEzkDOsqEc@diego \
    --to=heiko@sntech.de \
    --cc=alexandre.torgue@foss.st.com \
    --cc=davem@davemloft.net \
    --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 \
    --cc=punitagrawal@gmail.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 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).