Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1183912rbb; Mon, 26 Feb 2024 01:03:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFJU+F37ATewwX+M37vGPRJxmPUBiq4YYahxLEXm1w0UJ98MrdvFN1AwY1z7eRiXDDeRtuUmReEvoI7Y+F8jyCbV2I6SAx6dMR32zNtA== X-Google-Smtp-Source: AGHT+IHB+sqZBJOPbxzMI4QJtmj0XkjVhcA3nNY2YBS8UvJjrPVbXoKhfo1YJ5dVJmryCAUjJ3+/ X-Received: by 2002:a81:b145:0:b0:607:899a:7fb8 with SMTP id p66-20020a81b145000000b00607899a7fb8mr5550120ywh.14.1708938216743; Mon, 26 Feb 2024 01:03:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708938216; cv=pass; d=google.com; s=arc-20160816; b=YQdyKGwEG9OZKrh83nUp5pmD5FMImf9hl5z3TvrFODykKx1j5PCg9aEu+hfJSiTK3j xr376B503ib143EW8ayjL0JbmhS2XIfQ8YUHG3NZwrvu8KecDp+dMY/X3Q62znLOqQvL BQ5ntehiXvjQxEDzzd72q/hYjKAB6o9UV7bkfBrGiPPxzU+9ajJdrMb0qmxs9cjHJCq/ TelgdeHELBdczEqCVrQo4j4o4K/yYxMX75pDQW8Uz4lB+DOHPMj/5PkmtmSUFIsiDflJ H00n1wOykKDUmXryWXN8mu9zea0aIES7Cs8w6++CGV9l1peG+HFiX3GpyLf8S8EPpg6c EgPA== 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=YxOYs1BKIWzUfJrr24nPImDL7BUVLq4COzo2ojlX8UE=; fh=iJqh5mPhKwvqyMm6i1eUy037NE8Pc96A6QIY6Y6wZUI=; b=s3XxgUkQxtyqMZZ4narEwFFOGLiPuU1idF4jBWMXJyumM2RQnECtV9zMAGUB/aMpHy 8o3RhOrik+cUHbgKEgbGH3/Toigxb7NsA6zP0gHhTOrg3EEPlouR+czioiX/9EokGvpJ LsjO9uWT7JXxE05uEhT3B9EjKWJhD/OC8SBtxriEGPa/jZ5kzddndkL0Ld6iOgfBvTDc 9hcnlTYRRTyH4nRtVORpraRikGrNyziILKBNMsqramO0aNh++gcmu7yk6HeAHYJenqUr gT0vac1dly3BbSdHksbqPsy3wbOpmuMzehTEoDL3DiliDLcrCWDbLxaYCcUsc0dARouV o7DQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=SiB7ahBR; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-80869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v20-20020ac85794000000b0042e430734b0si5131074qta.30.2024.02.26.01.03.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 01:03:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=SiB7ahBR; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-80869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3EF461C23366 for ; Mon, 26 Feb 2024 09:03:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07FCA128806; Mon, 26 Feb 2024 08:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="SiB7ahBR" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 7518E7D416; Mon, 26 Feb 2024 08:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708936146; cv=none; b=dbvCMcQf5lzONI1P40ctK+3hqxQlweXCmkz7JcPbwPO7UR6megamQnEJbzZpN+VPrYfprVkMtw17F5JULP4Lmi3I9eKGK8YQ0ElQVTTMoTcGz6QXZerqippxhd4YMLFImqmSlqGYE+2pAHQGenKbd37b9X54oh58SuC1o+tHAIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708936146; c=relaxed/simple; bh=QwdokXlJ3prP3UF9aEemis8U44QlFFmI3psO/hocK/o=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U8w6/hAygUHqM/r7d15gIJ+SCIyT2L9mkdCVPmf/2KMeuPR8RR5d9/PfSyXxtEnOgyM/mRSBfzfla89rRciOhtIsZ8Gl05+7ZNEmwntG9P/TbnHQnx7PSM4J5KN3Azab5PkFz2+NN0UUrLsps3xQAORooXTb31Bsat5R4ILmDj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=SiB7ahBR; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1708936144; x=1740472144; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=QwdokXlJ3prP3UF9aEemis8U44QlFFmI3psO/hocK/o=; b=SiB7ahBRcdxsngPF4zyQVglhMm+vm22u1856/pntAOlLPQBHjl7LUEG0 2TYVkXQZsmhSnLydmGkuOKNwBME6PbS++Aa9Z43OfEIB4WryV4C/K2/R0 XLDJAzskrOMF3BfTJs9MkagsPNB8C+5UJqScWV3KeKmVM1QxtKw/c5ElI irFvsO+4GkQKEWAZIdNRue5rJbrf27FBbXGkT3Q1xvIWNR2wrACkIjFM0 CSMN7n4veht8tW+zGqFLn1E49TTmsfbcZL0sP/ncl2pLVLFgd5w6dF5fV eosVXU89r4sZEq/cNfqTkwosj0XWA+oEWBjWpG+UFN/GVv4XdPXXduA1H A==; X-CSE-ConnectionGUID: hSJ/T3kRRSKwdBvF30aJmQ== X-CSE-MsgGUID: qFUve9w1So+ytz1WOU+MeA== X-IronPort-AV: E=Sophos;i="6.06,185,1705388400"; d="scan'208";a="16813907" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 26 Feb 2024 01:29:03 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 26 Feb 2024 01:28:41 -0700 Received: from localhost (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Mon, 26 Feb 2024 01:28:41 -0700 Date: Mon, 26 Feb 2024 09:28:40 +0100 From: Horatiu Vultur To: Raju Lakkaraju CC: , , , , , , Subject: Re: [PATCH net 2/3] net: lan743x: support WOL in MAC even when PHY does not Message-ID: <20240226082840.qbofj764s35zo352@DEN-DL-M31836.microchip.com> References: <20240226080934.46003-1-Raju.Lakkaraju@microchip.com> <20240226080934.46003-3-Raju.Lakkaraju@microchip.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="utf-8" Content-Disposition: inline In-Reply-To: <20240226080934.46003-3-Raju.Lakkaraju@microchip.com> The 02/26/2024 13:39, Raju Lakkaraju wrote: > Allow WOL support if MAC supports it, even if the PHY does not support it > > Fixes: e9e13b6adc338 ("lan743x: fix for potential NULL pointer dereference > with bare card") > Please no spaces between the tags. And you should not split on multiple line Fixes tag. > Signed-off-by: Raju Lakkaraju > --- > drivers/net/ethernet/microchip/lan743x_ethtool.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c b/drivers/net/ethernet/microchip/lan743x_ethtool.c > index a2b3f4433ca8..4899582b3d1d 100644 > --- a/drivers/net/ethernet/microchip/lan743x_ethtool.c > +++ b/drivers/net/ethernet/microchip/lan743x_ethtool.c > @@ -1163,6 +1163,17 @@ static int lan743x_ethtool_set_wol(struct net_device *netdev, > struct ethtool_wolinfo *wol) > { > struct lan743x_adapter *adapter = netdev_priv(netdev); > + int ret; > + > + if (netdev->phydev) { > + ret = phy_ethtool_set_wol(netdev->phydev, wol); > + if (ret != -EOPNOTSUPP && ret != 0) > + return ret; > + > + if (ret == -EOPNOTSUPP) > + netif_info(adapter, drv, adapter->netdev, > + "phy does not support WOL\n"); > + } > > adapter->wolopts = 0; > if (wol->wolopts & WAKE_UCAST) > @@ -1187,8 +1198,7 @@ static int lan743x_ethtool_set_wol(struct net_device *netdev, > > device_set_wakeup_enable(&adapter->pdev->dev, (bool)wol->wolopts); > > - return netdev->phydev ? phy_ethtool_set_wol(netdev->phydev, wol) > - : -ENETDOWN; > + return 0; > } > #endif /* CONFIG_PM */ > > -- > 2.34.1 > -- /Horatiu