mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vineeth Karumanchi <vineeth.karumanchi@amd.com>
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: Mon, 10 Jun 2024 14:46:07 +0200	[thread overview]
Message-ID: <b46427d8-2b8c-4b26-b53a-6dcc3d0ea27f@lunn.ch> (raw)
In-Reply-To: <20240610053936.622237-4-vineeth.karumanchi@amd.com>

> @@ -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.

> @@ -5257,6 +5247,12 @@ static int __maybe_unused macb_suspend(struct device *dev)
>  		return 0;
>  
>  	if (bp->wol & MACB_WOL_ENABLED) {
> +		/* Check for IP address in WOL ARP mode */
> +		ifa = rcu_dereference(__in_dev_get_rcu(bp->dev)->ifa_list);
> +		if ((bp->wolopts & WAKE_ARP) && !ifa) {
> +			netdev_err(netdev, "IP address not assigned\n");

"IP address not assigned" on its own does not give a user whos suspend
fails a very good idea why.  "IP address not assigned as required by
WoL walk ARP" would be better.


    Andrew

---
pw-bot: cr

  reply	other threads:[~2024-06-10 12:46 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 [this message]
2024-06-11  6:05     ` Vineeth Karumanchi
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=b46427d8-2b8c-4b26-b53a-6dcc3d0ea27f@lunn.ch \
    --to=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 \
    --cc=vineeth.karumanchi@amd.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

all inboxes | Powered by JetHome®