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 7A5D2313535; Wed, 3 Dec 2025 15:36:39 +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=1764776199; cv=none; b=U6UbyrD9RIdq9ZyMSESw+75Adg+PSsqKotTWSBmXFP1cgR4ZaFiJZZBJzbHtaXCW2PDn+eXTlTUWkl2ggMeCWel0GE/KssXLzBz14jNAzxGN4eXHoAsJA6jNmNl1QHaR12NIJqqRgbMN4vpJeJq7L1u+9Z0hyz/ca8OQNo0PKHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764776199; c=relaxed/simple; bh=VdCgBsswWc7HTyxwmQp+t5W5nxmxaBhE8kIj/72wYsg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ezK0FQOpeAtcC7s3dtq19ZtFsdioV+O6gq40qa0QG26PwyOexXw/l8h1gfCxlTTDIwJAf2IENTPWMcIEtPR8EKUPTkpnopC7QZUSavxib8rEaxUQKWIOmMJvbz9DTh/tAxqG9mhSXivuDG5VZpC6ZNyvVLBcccTxOKH5uFl8tQA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XWcl8bXB; 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="XWcl8bXB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A1F7C4CEF5; Wed, 3 Dec 2025 15:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764776199; bh=VdCgBsswWc7HTyxwmQp+t5W5nxmxaBhE8kIj/72wYsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XWcl8bXB84Px2UITSukbwME2++u4HpHSfob6dAshKnvez6GAq3P4AB2aT+WCfea82 xo0kaMQPGDNJIg1cDsTBAnXFPenixMSnf8pRLKJm4l7KuCzNJTDcBg3Z30n2fL1qpW P2Rz7FzQkNXY88+2/wxi+oFs84f1QFURQapAgda0= 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.10 111/300] net: sh_eth: Disable WoL if system can not suspend Date: Wed, 3 Dec 2025 16:25:15 +0100 Message-ID: <20251203152404.733782618@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203152400.447697997@linuxfoundation.org> References: <20251203152400.447697997@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.10-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 e2019dc3ac563..88ba7972ce635 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