Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3087590rwi; Fri, 21 Oct 2022 11:19:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6r4u1SiN/yGqy3BP+8udeLo7PwApWS7RHmxgANZz6ykQBK9LHRp1HII9U6ABlVDHFe1K9B X-Received: by 2002:a17:90b:17c9:b0:20d:489b:55c0 with SMTP id me9-20020a17090b17c900b0020d489b55c0mr24556554pjb.232.1666376397231; Fri, 21 Oct 2022 11:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666376397; cv=none; d=google.com; s=arc-20160816; b=CROQqoWrWQha0PACT+1IoUJomtaSguOrjN5ndZqYh6fbmAwP2Na5BN0J26hFrGqOpd k8KX3KOphfY2002qt6t4QYntE+sAij6e/G5MOU+4nwTO9IchdDb7R9arhGT2jqRTvAxX sc0ZysnxFmiEFdHcibfMMfu1mU6iXn6UE7hs0N2OXToVwaPu0wSH9KhmgylKH4QY3Fgs R6oKt264sapupC+sxgoIJA756ueiHbW2D12lR3hRAIEjRSh38GAPiD0E8UsfBF2Tu6qf A6xXKnSmcHNO3lmucsAWFZQrMBjMqMIRUgWhPmAA3h/CPh4ysE67ojTocs1xR84Vw0Pk 3SfA== 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=CKiwJ2yC1X539pKCUJB/pi2OhDOGFkEXDg0oCIoInPg=; b=LAz4Mc9s6JVj5Wyv3uccNOI27OOUV3ZoZ9Vwnye2a4W5mxIPS4MKpiIe4yg5pYh3YL +L+r+m9qm5qDSd1vRcprSAjoaZM05lOmUXTw3pY7Eb/r0/nBQURfwkMz4fCb7U1b9Ngd LdnlWWAE404qBUyrK+Zr/epaEqmo7mzSn8B+cRimxUcJGUxH5DUgmJFyx8bNybmDWJaF 0BDiQMn6jzta5w2ccNpzHPl/cr/yqFW+NkMIx1N8hFsAcapt8ER6G3Pyifz+IE0PqDQ0 bhvd5P5AGFwsq4aPHjLLsEJpSl0NP77WcJBnoTyBPkZdvaMrMPUWTO0OtjQXFrAAaaRp 0/rg== 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 q18-20020a17090311d200b00178662903bcsi27923456plh.52.2022.10.21.11.19.21; Fri, 21 Oct 2022 11:19:57 -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 S229494AbiJURqb (ORCPT + 99 others); Fri, 21 Oct 2022 13:46:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbiJURq1 (ORCPT ); Fri, 21 Oct 2022 13:46:27 -0400 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3628E21E101; Fri, 21 Oct 2022 10:46:17 -0700 (PDT) Received: from unknown (HELO iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 22 Oct 2022 02:46:17 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id 33C4F20584CE; Sat, 22 Oct 2022 02:46:17 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Sat, 22 Oct 2022 02:46:17 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 9DB20B62A4; Sat, 22 Oct 2022 02:46:16 +0900 (JST) From: Kunihiko Hayashi To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH net] net: ethernet: ave: Remove duplicate suspend/resume calls for phy Date: Sat, 22 Oct 2022 02:45:52 +0900 Message-Id: <20221021174552.6828-1-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Since AVE has its own suspend/resume functions, there is no need to call mdio_bus suspend/resume functions. Set phydev->mac_managed_pm to true to avoid the calls. In addition, ave_open() executes __phy_resume() via phy_start() in ave_resume(), so no need to call phy_resume() explicitly. Remove it. Suggested-by: Heiner Kallweit Fixes: 0ba78b4a4989 ("net: ethernet: ave: Add suspend/resume support") Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c index 14cdd2e8373c..b4e0c57af7c3 100644 --- a/drivers/net/ethernet/socionext/sni_ave.c +++ b/drivers/net/ethernet/socionext/sni_ave.c @@ -1271,6 +1271,8 @@ static int ave_init(struct net_device *ndev) phy_support_asym_pause(phydev); + phydev->mac_managed_pm = true; + phy_attached_info(phydev); return 0; @@ -1806,12 +1808,6 @@ static int ave_resume(struct device *dev) wol.wolopts = priv->wolopts; __ave_ethtool_set_wol(ndev, &wol); - if (ndev->phydev) { - ret = phy_resume(ndev->phydev); - if (ret) - return ret; - } - if (netif_running(ndev)) { ret = ave_open(ndev); netif_device_attach(ndev); -- 2.25.1