Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2663529rwb; Mon, 19 Sep 2022 08:13:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7pNK0RtcD+s4QO2QWdXsb77yWldH5Hxh+iOpD4iJ+daz3E/EyLGYqJVUkmKhW2mrrIRLyf X-Received: by 2002:a17:90a:d982:b0:203:814d:dde6 with SMTP id d2-20020a17090ad98200b00203814ddde6mr9290337pjv.66.1663600390332; Mon, 19 Sep 2022 08:13:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663600390; cv=none; d=google.com; s=arc-20160816; b=VZuG0HyJyHWAus0dXAntqkAp3NdLe5dwKeY5HdEqq8qbpNEbtpViRmiFGac8encvvS M4SPfQyxqhE3sQRgcUm/+y1aRs46E4O71SjDiQmBDGtoAd0lPdOjTBYAOV6LMOVTBclp wYoKeBh3ZFJY7Xg2K+kcx1ItUMxOBGmCWJMXj2o+RjsN/nWh2zK+8+6ey73Y/r83V+JZ bw4H/QlZlH9tb03GKGe1fRz4DzQpxBwqi1hn5aRx/VfHw28auoE1d4UTpZd0yS8Gadu9 y+5aqEPF+CLJJ7gLilNm76Oyw5E3x+fx8cOtm11lbpngdPnta/yrkXA9zcMN/eh7DZuy oOcA== 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=K8ArsP+aHGJm4TZfMPoKFhUF7ZMPka4RohPeDwegaiQ=; b=qiIEisaiZl0XzkKjkEXFw7gEzTtknpe77kt62LzJDo6KtMmmWsm9JotriqhjE4BrZn rnxQst7MbnIoYZyXne5vvTW+bpyY++cWRn/2s44zN10Gzh+wCiAv7iDOYRbmdA6Ym9k9 qwKy5pJeBSirsVMR/JdiQWo5o8NGvIiS0feJJBu8LG3yVo21MzpFqfYL4Get1VevbuPb 0dACpS9zjEy3qWocHVubRXjo1wg71cDFOvwu70+FDAqCjUWhj5A4AK94fTodiIiIMPSo XgbVfxWKC5ZtWnWctCaXRcB5ubDKJGlonQI1W2tGoS0l3Teer9jJAityl2/5I8uBy4QE bxng== 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 pv9-20020a17090b3c8900b001fdb4973e60si11172871pjb.21.2022.09.19.08.12.58; Mon, 19 Sep 2022 08:13:10 -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 S230150AbiISOsP (ORCPT + 99 others); Mon, 19 Sep 2022 10:48:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbiISOsI (ORCPT ); Mon, 19 Sep 2022 10:48:08 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD9B032BA5 for ; Mon, 19 Sep 2022 07:48:06 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed50:ed67:3be8:ebe5:696d]) by xavier.telenet-ops.be with bizsmtp id Mqo32800T0GZoLL01qo3Bn; Mon, 19 Sep 2022 16:48:05 +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 1oaI43-005dK9-0L; Mon, 19 Sep 2022 16:48:03 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1oaI42-00GeIZ-Ch; Mon, 19 Sep 2022 16:48:02 +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: ravb: Fix PHY state warning splat during system resume Date: Mon, 19 Sep 2022 16:48:00 +0200 Message-Id: <8ec796f47620980fdd0403e21bd8b7200b4fa1d4.1663598796.git.geert+renesas@glider.be> 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: 1197 at drivers/net/phy/phy_device.c:323 mdio_bus_phy_resume+0xbc/0xc8 As the Renesas Ethernet AVB 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/ravb_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index d013cc1c8a0ad007..abe6f570fe102636 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1449,6 +1449,8 @@ static int ravb_phy_init(struct net_device *ndev) phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT); } + /* Indicate that the MAC is responsible for managing PHY PM */ + phydev->mac_managed_pm = true; phy_attached_info(phydev); return 0; -- 2.25.1