lkml.org 
[lkml]   [2024]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net V2 2/2] net: lan743x: support WOL in MAC even when PHY does not
From
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


\
 
 \ /
  Last update: 2024-05-27 15:56    [W:1.058 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site