Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp331523lqp; Mon, 10 Jun 2024 05:46:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNE9OqDMymDGURxVBMkkpcqq7ZGqIUdsPjxBUKY1dMZGXUyBxf/wtzm+gS5bbICCzbaY0Obw2/V4sksZiKU/QQpKUwW2Og/Vc3Y0GBvw== X-Google-Smtp-Source: AGHT+IF1wsyItHCWDPcEq8LrdX/VrpStk8v8jn9/WFzcb7f0W/yBGTJ2W5uL84r6KyMd3Xeqsgy0 X-Received: by 2002:a17:906:560d:b0:a6f:1464:e1ef with SMTP id a640c23a62f3a-a6f1464e22fmr271723466b.31.1718023599748; Mon, 10 Jun 2024 05:46:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718023599; cv=pass; d=google.com; s=arc-20160816; b=PpXDqiboPYvkoasq56Dq3ESXVwSz4J/Bo2XJMlwepvJvqmo/RqwAbNdC51Nt+ANmPV iiUvnyhj4TYMryKAEOqEyVquaMyuoRq5SP2fo5Os1qFxwijSsga4n/qCEYb70CC9HgpT EGvVKRw4DAQuHNDtKILD91s+YeM29PcYct+ryqwHFcvQx/zmO9uApZs8LY4fPw7pm5jM LxLhGKwxemiDoCqjC1TwxAKqE/zSm8SIhsAEtJeqcpx0mJ3MCRBhShBCv84KK1BfE+mH sG55LCVGxsRWZ2OyGt9d/vEDJC0lSNn+Q4ChF8nemjcRmrNPS+Frn/EyQD1JkJXsJ8qV QWMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bN/MqI/H7ST5s3XZJ2g/NEy+WWWfgWgz/Insw+RA3PA=; fh=pRc5M8dRuC5Zmn26duS1zVO8fJ6wmApoN6KE5aDxmg0=; b=D5YWlxzhoXvPo6nymYQ7iLVMFg+WIEdBNy1hELEVxG48QEQO0GYhdDXBUYl/lBQ8Xe rqL+L05Jpp2hdd5+CL+s4rl5KbFkGP+PDHVLdycvmCBUsPpgJVEdCs78pX/PTso/YxuR HY6W5KUwT/ZKj1l6SLfQLjfYcAIzPgcSXIx7pxrUFiMQMLQwJsMVoIk7DnhbXOlaQaen GxMK+bCegyYSBkPrkZse3kb5HGexl9hf8wdysFeMVvu1ySzYBn0K2ZMX2cK//U4WxDRo FVIb/aLrae9bLfxPQ8Up6uqBnFuxVkRODU5SziTyJNwFWc7vsa0NVOQ24wI60CxMfpC4 H/hg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=BwVfcNT6; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-208170-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c8070c0b0si452778166b.607.2024.06.10.05.46.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 05:46:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208170-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=BwVfcNT6; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-208170-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 769331F21B64 for ; Mon, 10 Jun 2024 12:46:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6E974AEC8; Mon, 10 Jun 2024 12:46:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="BwVfcNT6" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C986F7E576; Mon, 10 Jun 2024 12:46:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718023584; cv=none; b=G7Mge9CPS1Fxb5WLkG3Gq8TilZN8Yof4hoBLGSX26DR5JLI1/iitfejYDcQqnMzl7jPmqSzA2E6c2pUm4YRl9HRKt4neEIRyTGDVNAJ6ypNLOGhSqxzCimVdiEdvo0QPlqIPL2kO8UnYvxkvojG3nw0lJHFuISAVv6rq4PYJfwU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718023584; c=relaxed/simple; bh=1KSrYV9LSAMiVSDqg4YllA/qK2mV4TYwx0hJ+/HkKLw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S2TEGWkrQL1o62qNslenOWIj6Lrp8F8RIXV6gQXOSDFV84Tymv/MO3C9jnkY7ymobOWvyZPdWH5onfhLzu/LocEzWCJHfJMWYOBH3n56r8Y6iIWZMYws5a7uYvI59+mdISMdptrBer7ZgoYtEvjGvmZ1BkrZNxLgXMX6S5I6Tjc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=BwVfcNT6; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=bN/MqI/H7ST5s3XZJ2g/NEy+WWWfgWgz/Insw+RA3PA=; b=BwVfcNT6d9uK+bJOp8evPMyN3M Aoi5RqklnpHf7t6Xbf+RFXQdS4BMeQ5EHqxTtbQJA+hDCjY27zmkG9wythBzIaj+6rffWvt8/7Xcw j0tp9VGMcW4LIQDvCAz7xuGoFlDfbfoj5mJdJgVxV0fmnf4wsgW7i53lKO/CaE20z1jI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sGePX-00HISO-TM; Mon, 10 Jun 2024 14:46:07 +0200 Date: Mon, 10 Jun 2024 14:46:07 +0200 From: Andrew Lunn To: Vineeth Karumanchi 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 Message-ID: References: <20240610053936.622237-1-vineeth.karumanchi@amd.com> <20240610053936.622237-4-vineeth.karumanchi@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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