From nobody Tue Dec 16 04:36:59 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65C0BC32771 for ; Mon, 26 Sep 2022 11:56:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238318AbiIZL4v (ORCPT ); Mon, 26 Sep 2022 07:56:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238985AbiIZLyN (ORCPT ); Mon, 26 Sep 2022 07:54:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6113E24F26; Mon, 26 Sep 2022 03:49:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CB099B8085B; Mon, 26 Sep 2022 10:48:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 310EEC433C1; Mon, 26 Sep 2022 10:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664189303; bh=suDTPmLcdkGIXtvv6sdCMVRxwD7vN0GRy22VpzSrNuA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qf5qhzAU43kMVtMgVBrA99Rdq9Oa+fm4i846OTVxBRs+cxktekI8OYUgJQiRoGQlJ l+8rJVPDj39VSzqiqyGr3jFuy2fszjgGuZqIs1eIB3pWJx3rHpZQL7hriPnuahe9Ue 5f77wZYy8FhtaF0IhHbUboLhmN1zsRslb2I7OvGg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Florian Fainelli , Sergey Shtylyov , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.19 142/207] net: sh_eth: Fix PHY state warning splat during system resume Date: Mon, 26 Sep 2022 12:12:11 +0200 Message-Id: <20220926100812.860851945@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100806.522017616@linuxfoundation.org> References: <20220926100806.522017616@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Geert Uytterhoeven [ Upstream commit 6a1dbfefdae4f7809b3e277cc76785dac0ac1cd0 ] Since commit 744d23c71af39c7d ("net: phy: Warn about incorrect mdio_bus_phy_resume() state"), a warning splat is printed during system resume with Wake-on-LAN disabled: WARNING: CPU: 0 PID: 626 at drivers/net/phy/phy_device.c:323 mdio_bus_phy_= resume+0xbc/0xe4 As the Renesas SuperH Ethernet driver already calls phy_{stop,start}() in its suspend/resume callbacks, it is sufficient to just mark the MAC responsible for managing the power state of the PHY. Fixes: fba863b816049b03 ("net: phy: make PHY PM ops a no-op if MAC driver m= anages PHY PM") Signed-off-by: Geert Uytterhoeven Reviewed-by: Florian Fainelli Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/r/c6e1331b9bef61225fa4c09db3ba3e2e7214ba2d.16= 63598886.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/renesas/sh_eth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/r= enesas/sh_eth.c index 67ade78fb767..7fd8828d3a84 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -2029,6 +2029,8 @@ static int sh_eth_phy_init(struct net_device *ndev) if (mdp->cd->register_type !=3D SH_ETH_REG_GIGABIT) phy_set_max_speed(phydev, SPEED_100); =20 + /* Indicate that the MAC is responsible for managing PHY PM */ + phydev->mac_managed_pm =3D true; phy_attached_info(phydev); =20 return 0; --=20 2.35.1