Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp821489rwb; Mon, 26 Sep 2022 06:20:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7uCp9hVVbJ5VOzpIMBn9wh3GIaOw6q87m8Cw7S6A6D8jvAWZDFyrE+SyVts9x+qZXoEki5 X-Received: by 2002:a63:e709:0:b0:438:98e8:d1c with SMTP id b9-20020a63e709000000b0043898e80d1cmr20255329pgi.403.1664198440648; Mon, 26 Sep 2022 06:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664198440; cv=none; d=google.com; s=arc-20160816; b=p9VuuN2pEfNs2U1fh6PHdSu15rWT1yc5OrAjjTalZAr31MRF4PJGn6Km2hzOL0cx6Z ghFT/sG2x2R7fTbhCgjdBvGMyYzpefZGvuBIsphind4X/kv9c+Q5S8eIPrI3mxey/4uq Nf2bir2kz1FUgUZeOaplAXIBepfB6zpw6sOsPxtICqTnPR2xdk5hPoshHhAzSQaT5DtS T/gKLThmWanFqzUrgoiBzK9pkqza46FDapWsCUmr84nvOH4bOoo2aSCOa36jto63R9w3 jUOM57ag8r+mQxseEQhVUH0sSrVxvBjjcp/kWkE7EaU+jpHubhTKaYFj5uUv9s0ElptC 46GQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IUCB9fNavfLQWg9z8L4PEuPrGWfYN4QJAyR6xknGG9Y=; b=wp+nLsRHqVIuR1zUUKgkWmUSr9M0CCQQqiJ0///N3HTJEqlbUwAvkDyzAhv89MDX4o Bspun7VLRVum6E6eoDSRoeOLgGTWKY2ZSXDtcF1jqmh+Dod01peVxcGk5sH705vdHHcv yw+xhjdg8GrrqTJaT98REi/C1QQOf6gH6e3l/Fv3fOIZBsNEko5mTFeaM3KzVC0FqP+7 JD3BD9C1gK1F0fxtAeC0RYXqhHn6sr8E05WOETK/dGLXC1UK16RLD87Ze+E8WY+D3WDv Vo1TiTRU73Wsjnn6cCmFNdwhBKA4SOHmcU5Z7NcuPBsgIKdC6IOckV0AybEyvD0SyCvn J1MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qf5qhzAU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r124-20020a632b82000000b0043c700ff7f6si8770150pgr.721.2022.09.26.06.20.28; Mon, 26 Sep 2022 06:20:40 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qf5qhzAU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238896AbiIZL4v (ORCPT + 99 others); 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 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 manages PHY PM") Signed-off-by: Geert Uytterhoeven Reviewed-by: Florian Fainelli Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/r/c6e1331b9bef61225fa4c09db3ba3e2e7214ba2d.1663598886.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/renesas/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 != 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.35.1