Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2645472rwb; Mon, 19 Sep 2022 08:01:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6uS/tVdu2DtA21cezL1NWFkOfWAOzdvQ9l7cjpf6cC44FhOsE/EULZ9AJlE3GUXpWtjKbb X-Received: by 2002:a17:906:8468:b0:77a:5905:81aa with SMTP id hx8-20020a170906846800b0077a590581aamr13101512ejc.481.1663599679903; Mon, 19 Sep 2022 08:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663599679; cv=none; d=google.com; s=arc-20160816; b=rsZjvJEp00xyT9UrgF2swENIx5UETHZjdWm0l/2T9xHzfDHOTBuTQYLMRLS3NTiBAk VO5+DHDrZ9vF88daLg9ghuZbc1BfivZQVliAi4evNxkr3K4S6TaPABsSq073kEvscJoX SA4elMCSEbdydzeP8PHQqnC7Lg4Xe4y+X/d7qAWMLyFAT8/3H/ltcxbqThO35Ei8jakr S1cmimaBSe24Pu/4moevDtiINCzjOJh3mBRo9V/Ei2lUFB+uLSEq4UIBeBJZkOhgEu1+ LFbqH7a/xzz5aw+Cz7ZVLcHOpzzAbM1EDqxQLyHPfccFHagHIernIfAix52uWWit/xmx C4Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=msP8+AYgc3DkXXMxu/HIRw+bQpLqTIdssukTIGbxWMU=; b=hjLxOjHCBAZmGuEDcqFMi+nNIAfWWTXZGafVOtI5Titk37bAZWbRR3OX4MtifV/WyQ TIDmrJF8nClowxpcbu7Faeo1SkFoLkqq0c/YExTu+lNxizl9MkdUTFGtxYteDXnieok2 CVvyroxVr1lJteSvDdOPg8Y8BT1ThR1vw0MCsPI018rNZf3cD/VAQR8ZeuLODy+gpJhu Pu/DJ0tPwREaAp5aDa09S69QkxxvJyx+LwNAwrMUECcujON18nEH0RAlhbbECcFpTZvE zH68KvN6PAKQPHeoUm4Av5IK3b/s1wD6DwCgSMPwg1zQGWcw0jSyrx8Dm/GQrCwiVlG1 fMtw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a1709060f4800b00718bf486a1csi10173769ejj.782.2022.09.19.08.00.44; Mon, 19 Sep 2022 08:01:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbiISOsx (ORCPT + 99 others); Mon, 19 Sep 2022 10:48:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230269AbiISOsf (ORCPT ); Mon, 19 Sep 2022 10:48:35 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8825F2E9D1 for ; Mon, 19 Sep 2022 07:48:33 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed50:ed67:3be8:ebe5:696d]) by baptiste.telenet-ops.be with bizsmtp id MqoW280040GZoLL01qoWqt; Mon, 19 Sep 2022 16:48:31 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1oaI4T-005dKX-MD; Mon, 19 Sep 2022 16:48:29 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1oaI4T-00GeKC-6I; Mon, 19 Sep 2022 16:48:29 +0200 From: Geert Uytterhoeven To: Sergey Shtylyov , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiner Kallweit , Florian Fainelli Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] net: sh_eth: Fix PHY state warning splat during system resume Date: Mon, 19 Sep 2022 16:48:28 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 manages PHY PM") Signed-off-by: Geert Uytterhoeven --- 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/renesas/sh_eth.c index 67ade78fb7671c4a..7fd8828d3a846169 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 != SH_ETH_REG_GIGABIT) phy_set_max_speed(phydev, SPEED_100); + /* Indicate that the MAC is responsible for managing PHY PM */ + phydev->mac_managed_pm = true; phy_attached_info(phydev); return 0; -- 2.25.1