Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3331166rwa; Tue, 23 Aug 2022 03:01:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5R3QGwMYYM/U5NIqX/Iryl6DV+FwaxUZWkMCiObDLdRqQMChJTFWSOaqIxMGVVD6Mf7yIv X-Received: by 2002:a17:907:97c2:b0:731:5679:2cd3 with SMTP id js2-20020a17090797c200b0073156792cd3mr15523141ejc.746.1661248868558; Tue, 23 Aug 2022 03:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661248868; cv=none; d=google.com; s=arc-20160816; b=rP4ZC8I78Dq4Mb2aqxYMCKMgpQoYcvl0oERVwqAxG9iGbRhLFXh60VV/dxoBvES6io oyNLWF9zaDWvvhwT9pFARBEONJCOHYK4LduguYSZo/XXfbe34tEhZ33yRWIx+TSJLpIl KWrsdvjdk/wU5iwee+ENp2LTSc6RIij5WUA4chO1OphippauQR2bvqQXY+atIIIO1fXk 5NlnF6Pdr7t5PQ8WPn/CAmZXX0/l3tOnwYWb1r+yzf9inubqSNHx32erZvHmo7Q6O/3g owsP/guT+mX9fY4MUiNxIZjeDS/NWXahmCrwUharXJUgAJs7VsGNrLgYKxijAnD7VBQj vE4g== 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=+5tKruibhk7YYCXTQPGqdwER0CR4dwQ2TmsyCed7YlY=; b=iq/BYD7yvUqt0xgsSqSjJHQAByXQaAdVJo/On7+lJNnoCmXvq/dSOwcn5HobHkHNuF m7Rs1+mz717nczRO+A0ss+1sm+meG7ASaVUXqGC7KVp3UWVH/Bw+rZSpw20RXvIRCTiK Mwm9y+g1CqfYeuhj9AubPcybq6oGUhKYBReABcj/wVq9J203p48SDXckEHghsDwxmWBE RYt6PHoJJYAeyR/35P8fQ85wzE6N8OGWdR7p/eEO07y2Wc/EsNmYpYLUyqkHQCpuUGdq Kzs/SFrMoXiMN3qsYSppCmn3BuWYak1j/upX7zyCGm7//g1nVPx5tpBy3RY1kW1VFjaC m4xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XwC93PXj; 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 sa30-20020a1709076d1e00b0073d78bbd49csi5609671ejc.666.2022.08.23.03.00.36; Tue, 23 Aug 2022 03:01:08 -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=XwC93PXj; 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 S239865AbiHWJvp (ORCPT + 99 others); Tue, 23 Aug 2022 05:51:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242687AbiHWJtB (ORCPT ); Tue, 23 Aug 2022 05:49:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D38D6A48C; Tue, 23 Aug 2022 01:44:51 -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 dfw.source.kernel.org (Postfix) with ESMTPS id F13566153C; Tue, 23 Aug 2022 08:43:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05F01C433C1; Tue, 23 Aug 2022 08:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244227; bh=u9FU03dzZss74zYK7e0UEvHhyL3ijZBUACDdhcYl4gc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XwC93PXjYl5fUjobSl3a6Fu4cNREf0bNeUWh7UlE67bjGziqzbocz96oky1iwQq/R sVh1mTafRhzBFiEKn3l1YhO3kMbpya5SfojuzJQEvSWExg3369FAyVviKP995yPwzB jPvg0Nkfn+oS8VvpdvBiy/FhzzWy+vkfbhfV6hE4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Fainelli , Jakub Kicinski Subject: [PATCH 5.15 059/244] net: bcmgenet: Indicate MAC is in charge of PHY PM Date: Tue, 23 Aug 2022 10:23:38 +0200 Message-Id: <20220823080101.045630065@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@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.1 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,T_SCC_BODY_TEXT_LINE 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: Florian Fainelli commit bc3410f250219660a7be032c01c954a53b2c26ab upstream. Avoid the PHY library call unnecessarily into the suspend/resume functions by setting phydev->mac_managed_pm to true. The GENET driver essentially does exactly what mdio_bus_phy_resume() does by calling phy_init_hw() plus phy_resume(). Fixes: fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20220804173605.1266574-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/genet/bcmmii.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -361,6 +361,9 @@ int bcmgenet_mii_probe(struct net_device if (priv->internal_phy && !GENET_IS_V5(priv)) dev->phydev->irq = PHY_MAC_INTERRUPT; + /* Indicate that the MAC is responsible for PHY PM */ + dev->phydev->mac_managed_pm = true; + return 0; }