mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vineeth Karumanchi <vineeth.karumanchi@amd.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: nicolas.ferre@microchip.com, claudiu.beznea@tuxon.dev,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	linux@armlinux.org.uk, vadim.fedorenko@linux.dev,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, git@amd.com
Subject: Re: [PATCH net-next v4 3/4] net: macb: Add ARP support to WOL
Date: Tue, 11 Jun 2024 11:35:03 +0530	[thread overview]
Message-ID: <6c01bed7-580e-4f1a-9986-39c20f063e67@amd.com> (raw)
In-Reply-To: <b46427d8-2b8c-4b26-b53a-6dcc3d0ea27f@lunn.ch>

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



  reply	other threads:[~2024-06-11  6:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10  5:39 [PATCH net-next v4 0/4] net: macb: WOL enhancements Vineeth Karumanchi
2024-06-10  5:39 ` [PATCH net-next v4 1/4] net: macb: queue tie-off or disable during WOL suspend Vineeth Karumanchi
2024-06-10  5:39 ` [PATCH net-next v4 2/4] net: macb: Enable queue disable Vineeth Karumanchi
2024-06-10  5:39 ` [PATCH net-next v4 3/4] net: macb: Add ARP support to WOL Vineeth Karumanchi
2024-06-10 12:46   ` Andrew Lunn
2024-06-11  6:05     ` Vineeth Karumanchi [this message]
2024-06-11 12:57       ` Andrew Lunn
2024-06-10  5:39 ` [PATCH net-next v4 4/4] dt-bindings: net: cdns,macb: Deprecate magic-packet property Vineeth Karumanchi
2024-06-10 12:46   ` Krzysztof Kozlowski

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=6c01bed7-580e-4f1a-9986-39c20f063e67@amd.com \
    --to=vineeth.karumanchi@amd.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=git@amd.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=vadim.fedorenko@linux.dev \
    /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®