mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: ethernet: ave: Remove duplicate suspend/resume calls for phy
Date: Fri, 21 Oct 2022 22:55:01 +0200	[thread overview]
Message-ID: <2333ef88-6e3e-a5ad-dcdc-89a405ba2f9e@gmail.com> (raw)
In-Reply-To: <20221021174552.6828-1-hayashi.kunihiko@socionext.com>

On 21.10.2022 19:45, Kunihiko Hayashi wrote:
> Since AVE has its own suspend/resume functions, there is no need to call
> mdio_bus suspend/resume functions. Set phydev->mac_managed_pm to true
> to avoid the calls.
> 
The commit description doesn't make clear (any longer) what the issue
is that you're fixing. You should mention the WARN_ON() dump here
like in your first attempt.

> In addition, ave_open() executes __phy_resume() via phy_start() in
> ave_resume(), so no need to call phy_resume() explicitly. Remove it.
> 
This sounds like an improvement, being independent of the actual fix.
The preferred approach would be:
- submit the fix to net
- submit the improvement in a separate patch to net-next

> Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
> Fixes: 0ba78b4a4989 ("net: ethernet: ave: Add suspend/resume support")
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
>  drivers/net/ethernet/socionext/sni_ave.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
> index 14cdd2e8373c..b4e0c57af7c3 100644
> --- a/drivers/net/ethernet/socionext/sni_ave.c
> +++ b/drivers/net/ethernet/socionext/sni_ave.c
> @@ -1271,6 +1271,8 @@ static int ave_init(struct net_device *ndev)
>  
>  	phy_support_asym_pause(phydev);
>  
> +	phydev->mac_managed_pm = true;
> +
>  	phy_attached_info(phydev);
>  
>  	return 0;
> @@ -1806,12 +1808,6 @@ static int ave_resume(struct device *dev)
>  	wol.wolopts = priv->wolopts;
>  	__ave_ethtool_set_wol(ndev, &wol);
>  
> -	if (ndev->phydev) {
> -		ret = phy_resume(ndev->phydev);
> -		if (ret)
> -			return ret;
> -	}
> -
>  	if (netif_running(ndev)) {
>  		ret = ave_open(ndev);
>  		netif_device_attach(ndev);


  reply	other threads:[~2022-10-21 20:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 17:45 Kunihiko Hayashi
2022-10-21 20:55 ` Heiner Kallweit [this message]
2022-10-22 17:29   ` Kunihiko Hayashi

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=2333ef88-6e3e-a5ad-dcdc-89a405ba2f9e@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®