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: Tue, 11 Jun 2024 11:35:03 +0530
From: Vineeth Karumanchi <vineeth.karumanchi@....com>
To: Andrew Lunn <andrew@...n.ch>
Cc: nicolas.ferre@...rochip.com, claudiu.beznea@...on.dev,
 davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
 conor+dt@...nel.org, linux@...linux.org.uk, vadim.fedorenko@...ux.dev,
 netdev@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, git@....com
Subject: Re: [PATCH net-next v4 3/4] net: macb: Add ARP support to WOL

Hi Andrew,



On 10/06/24 6:16 pm, Andrew Lunn wrote:
>> @@ -3294,22 +3292,15 @@ static int macb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
>>   
>>   	/* Pass the order to phylink layer */
>>   	ret = phylink_ethtool_set_wol(bp->phylink, wol);
>> -	/* Don't manage WoL on MAC if handled by the PHY
>> -	 * or if there's a failure in talking to the PHY
>> -	 */
>> -	if (!ret || ret != -EOPNOTSUPP)
>> +	/* Don't manage WoL on MAC if there's a failure in talking to the PHY */
>> +	if (!!ret && ret != -EOPNOTSUPP)
>>   		return ret;
> 
> The comment is wrong. You could be happily talking to the PHY, it just
> does not support what you asked it to do.
> 


These are the 3 possible return scenarios

1. -EOPNOTSUPP. : When there is no PHY or no set_wol() in PHY driver.
2. 0 : Success
3. any error (-EINVAL, ... ) from set_wol()

we are returning in case 3.

The comment can be "Don't manage WoL on MAC, if PHY set_wol() fails"

please let me know your thoughts/comments.


🙏 vineeth



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ