netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	pabeni@redhat.com, edumazet@google.com,
	linux-kernel@vger.kernel.org, bryan.whitehead@microchip.com,
	UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net V2 2/2] net: lan743x: support WOL in MAC even when PHY does not
Date: Wed, 20 Mar 2024 15:59:59 -0700	[thread overview]
Message-ID: <6059f7e5-fd2c-493f-a1dd-acfc7e9e7701@gmail.com> (raw)
In-Reply-To: <22089299-a3e2-4cbd-942a-65ea070657b8@lunn.ch>

On 3/20/24 15:53, Andrew Lunn wrote:
>> +	if (netdev->phydev) {
>> +		ret = phy_ethtool_set_wol(netdev->phydev, wol);
>> +		if (ret != -EOPNOTSUPP && ret != 0)
>> +			return ret;
> 
> I'm not sure this condition is correct.
> 
> If there is an error, and the error is not EOPNOTSUPP, you want to
> report that error. However, if the PHY can support the WoL
> configuration, it will return 0, and this function should exit, WoL in
> the MAC is not needed. And doing WoL in the PHY consumes less power
> since you can suspend the MAC.
> 
> So i think it should simply be:
> 
>> +		if (ret != -EOPNOTSUPP)
>> +			return ret;

Agreed, that's what I did for bcmgenet_wol.c.
-- 
Florian


  reply	other threads:[~2024-03-20 23:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  4:21 [PATCH net V2 0/2] net: lan743x: Fixes for multiple WOL related issues Raju Lakkaraju
2024-03-20  4:21 ` [PATCH net V2 1/2] net: lan743x: disable WOL upon resume to restore full data path operation Raju Lakkaraju
2024-03-20 13:53   ` Jiri Pirko
2024-03-20  4:21 ` [PATCH net V2 2/2] net: lan743x: support WOL in MAC even when PHY does not Raju Lakkaraju
2024-03-20 13:51   ` Jiri Pirko
2024-03-20 22:53   ` Andrew Lunn
2024-03-20 22:59     ` Florian Fainelli [this message]
2024-04-05  8:17     ` Raju.Lakkaraju
2024-04-05 17:12       ` Andrew Lunn
2024-04-23 11:05         ` Raju.Lakkaraju
2024-04-23 19:10           ` Andrew Lunn
2024-04-24  5:58             ` Ronnie.Kunin
2024-04-24  6:07               ` Ronnie.Kunin
2024-04-24 12:13               ` Andrew Lunn
2024-04-25 11:37             ` Raju.Lakkaraju
2024-04-25 14:13               ` Andrew Lunn
2024-04-26  7:43                 ` Ronnie.Kunin

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=6059f7e5-fd2c-493f-a1dd-acfc7e9e7701@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=Raju.Lakkaraju@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=bryan.whitehead@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).