From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 143DE34D937; Wed, 3 Dec 2025 16:02:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764777777; cv=none; b=VgagHIEtrk6xKyxWYC3cvud2lyAyo/lvpckAkZqtg581wcZyhlqYss/HQ3VM8zodvFtVGd5j35Ex36217R815szHKdS0GTSzBQZR7GHg8StzT8HdDUVI9EU2k/vbRTDEiGw/5BliXAvSHpQPsd3z9Enq2wjk5ItzL37hDOOZksk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764777777; c=relaxed/simple; bh=oBnyBt0ZwoZsRmTnX/LU+Az0K3iAo56+/D3Wd8JRA34=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KdeP7Ig++UznhDfDg+OkoIg1UpC9FOKTsvJEsyYV9l+LdDCU28mk4kZmxHGyioplRtXVZHjm+he+c6kDWzNI1O6KSwRgmQlOwbih7Lfb5P1s8WHKoSBfPmBP4T6j9s8s63yTjLkGpwWlnIcI9qSVFguMmBsE9vPdnf9XccR3TSc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SljDQR3F; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SljDQR3F" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C58AC4CEF5; Wed, 3 Dec 2025 16:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764777776; bh=oBnyBt0ZwoZsRmTnX/LU+Az0K3iAo56+/D3Wd8JRA34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SljDQR3FvyUnZb68zSK92YeNtdUf9+ulsjdwmh19epGOIdNwkGbm2j4OX0XwVmNrp zQB698zRfXMRKTa8NuJv1wkg8Ss3b9l6NmIUOE0GapaoOqMuUx8q10Jb+WbNCm7Mne gaO0RN0f/1rJ6a3N4s57AXf4MRgBIcUL6aX5lTwE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Andrew Lunn , Geert Uytterhoeven , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 144/392] net: sh_eth: Disable WoL if system can not suspend Date: Wed, 3 Dec 2025 16:24:54 +0100 Message-ID: <20251203152419.384875755@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203152414.082328008@linuxfoundation.org> References: <20251203152414.082328008@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Niklas Söderlund [ Upstream commit 9c02ea544ac35a9def5827d30594406947ccd81a ] The MAC can't facilitate WoL if the system can't go to sleep. Gate the WoL support callbacks in ethtool at compile time using CONFIG_PM_SLEEP. Signed-off-by: Niklas Söderlund Reviewed-by: Andrew Lunn Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20250909085849.3808169-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/renesas/sh_eth.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 183db093815cb..b6f11c0c3e009 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -2362,6 +2362,7 @@ static int sh_eth_set_ringparam(struct net_device *ndev, return 0; } +#ifdef CONFIG_PM_SLEEP static void sh_eth_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) { struct sh_eth_private *mdp = netdev_priv(ndev); @@ -2388,6 +2389,7 @@ static int sh_eth_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) return 0; } +#endif static const struct ethtool_ops sh_eth_ethtool_ops = { .get_regs_len = sh_eth_get_regs_len, @@ -2403,8 +2405,10 @@ static const struct ethtool_ops sh_eth_ethtool_ops = { .set_ringparam = sh_eth_set_ringparam, .get_link_ksettings = phy_ethtool_get_link_ksettings, .set_link_ksettings = phy_ethtool_set_link_ksettings, +#ifdef CONFIG_PM_SLEEP .get_wol = sh_eth_get_wol, .set_wol = sh_eth_set_wol, +#endif }; /* network device open function */ -- 2.51.0