lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 20 Mar 2024 15:59:59 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Lunn <andrew@...n.ch>,
 Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
 pabeni@...hat.com, edumazet@...gle.com, linux-kernel@...r.kernel.org,
 bryan.whitehead@...rochip.com, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net V2 2/2] net: lan743x: support WOL in MAC even when PHY
 does not

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ