Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp1074709lqs; Wed, 6 Mar 2024 05:47:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWgUrCNBzxKp65oTbnbeRqESbHMyo/VYHMZD27F2HTeBUhvbszfv1eb/uWn1+STOdNWtIER8KJcIUw30l+1hBZzMXHns5WTSMiPl7u6tg== X-Google-Smtp-Source: AGHT+IEXvKH57iLbs12LwYCo8QFwzK/5IeJbublTxHNf2LPEPUN4cmVcd3mjqjtyDAtlQwJr96SQ X-Received: by 2002:a17:902:9a4a:b0:1dc:8180:5d6f with SMTP id x10-20020a1709029a4a00b001dc81805d6fmr4176940plv.30.1709732823660; Wed, 06 Mar 2024 05:47:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709732823; cv=pass; d=google.com; s=arc-20160816; b=Nj8eEV1WvxHAUUlwFHkUjuzYqeSrZkdKPbNsxtwsedtRbhWhrlroSdsbWMUExLqabV 13v4mBOTvxwLNj5qmy8uLfV8vlWrdpvk44MzBtnwpritvKQ6rX8aThdg5RRThn8/O7yO rZcTASvGi7ZE5UIhbow5sPMxqg9YisvlBV3EzPH6S3GuHPNZD+dl35lko5RMd+rH+dJ1 X7wr4+spoYw+2bv1SZUVr1HKRi7op3GmfsK2wDcYWaZbpDAmogv4VitY4Go9NWp5Lf1x PYCgWhpdkl+1i46/soWlU5wScS41IKn8ys56BnhKXXqZKVpokT44wb7S0ACvEhwAnar7 0GcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=QLyyfzj81FhuRKkD3CPVNFLPw7p1yRloGuwNuWPO7E4=; fh=CrDPfPlgkeovG7op10fbcGzHGY6r1dnuK3p4aI6pv3Y=; b=IO+/0q+Etw8XRgfbvCujriArXZBdaV6/eeCJjaxCio+Lek6yehKsdXxNRfKF9//o1V MIZYa1Gsw06hYbhTIKu5D7xg3T845iDfFiq+I3wu9lKQxTz+9cOWsh7vc7VVQGpGHILS 5B3sHN8fAZ0nqI51UMb7KceN6OGXG8qdvRLPIb5H+yR8/QPK9BC9unJiSuSk7FvTW4Ig MaSBVNbOXn/GW1zHGmgOSuLdOcu/TQRQ5/vNS6QLprSav+MGIOJJRM26hdfP1ekeXzx7 8AKmIjv6KQus+ZxBs9MupFv2TFsV1OH3z66+Gq9+SFFX+9dRQCGxftu55INXCK71nqC9 J+6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=actia.se); spf=pass (google.com: domain of linux-kernel+bounces-93988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93988-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i11-20020a170902c94b00b001d9285f0edfsi12070977pla.306.2024.03.06.05.47.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 05:47:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=actia.se); spf=pass (google.com: domain of linux-kernel+bounces-93988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93988-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4EFB2B21047 for ; Wed, 6 Mar 2024 13:38:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D06D0132C36; Wed, 6 Mar 2024 13:37:58 +0000 (UTC) Received: from mail.actia.se (mail.actia.se [212.181.117.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5258213174E; Wed, 6 Mar 2024 13:37:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.181.117.226 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709732278; cv=none; b=WojMiZK9H/1qYbZSfzFU43fLaurWfkpnS48tFhHi5lIA8lNmOf9fAgmHs3wwz4+ri0lGNUhgy3LmorBplENxfjU6+6EkeKC+iYaTY97Op9myNk1T/IdoreUA5y5/379Sg6THznf5n1DfkiK1XIwOO8PPUqF11tHpqiTksuaEGl8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709732278; c=relaxed/simple; bh=zmEX1PyysnR4IfejG+xCR/9Da+bh9s0rL8ilvGkuH2s=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=m64QoLE8emtjdw/R7LDWxQT/C8ulULSNLZ2W+/AC4/QDZohUtKB0Xvt+KB9A/U3uAkscp6zJK9Vt7BJHQvdYRsTqWJg0eUbMi7aT+K9UEbRTCdUmOQDVCHQQ56JTFrW5FIFFte2TZHx6Q5bvxMWw46lPqUN8CA8B6Kcv6g4a/4k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=actia.se; spf=pass smtp.mailfrom=actia.se; arc=none smtp.client-ip=212.181.117.226 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=actia.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=actia.se Received: from S036ANL.actianordic.se (10.12.31.117) by S035ANL.actianordic.se (10.12.31.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 6 Mar 2024 14:37:46 +0100 Received: from S036ANL.actianordic.se ([fe80::e13e:1feb:4ea6:ec69]) by S036ANL.actianordic.se ([fe80::e13e:1feb:4ea6:ec69%4]) with mapi id 15.01.2507.035; Wed, 6 Mar 2024 14:37:46 +0100 From: John Ernberg To: Wei Fang CC: Shenwei Wang , Clark Wang , NXP Linux Team , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "Paolo Abeni" , Heiner Kallweit , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , John Ernberg Subject: [PATCH net v3 2/2] net: fec: Suspend the PHY on probe Thread-Topic: [PATCH net v3 2/2] net: fec: Suspend the PHY on probe Thread-Index: AQHab8t46xO1JP3Hxke5Lu7SCFbkbQ== Date: Wed, 6 Mar 2024 13:37:45 +0000 Message-ID: <20240306133734.4144808-3-john.ernberg@actia.se> References: <20240306133734.4144808-1-john.ernberg@actia.se> In-Reply-To: <20240306133734.4144808-1-john.ernberg@actia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.43.0 x-esetresult: clean, is OK x-esetid: 37303A2921D72955627162 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Since the power management is now performed by the FEC instead of generic pm the PHY will not suspend until the link has been up. Therefor suspend it on probe. It will be resumed by {of_,}phy_connect() when the link is brought up. Since {of_,}phy_connect() and phy_disconnect() will resume and suspend the PHY when the link is brought up and down respectively, and phy_stop() and phy_start() will resume and suspend the PHY in the suspend-resume paths there is no need for any additional calls anywhere. Signed-off-by: John Ernberg --- v3: - Only call phy_suspend() in probe, it is taken care of by the phy framewo= rk (Wei Fang) - Update commit message to reflect the above - Drop fixes tag, this is technically not a fix anymore (Wei Fang) Should I re-send this for the net-next tree later, or is it still ok fo= r net? v2: - New patch --- drivers/net/ethernet/freescale/fec_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index 8decb1b072c5..fb092b7bfe85 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -2539,8 +2539,10 @@ static int fec_enet_mii_init(struct platform_device = *pdev) /* find all the PHY devices on the bus and set mac_managed_pm to true */ for (addr =3D 0; addr < PHY_MAX_ADDR; addr++) { phydev =3D mdiobus_get_phy(fep->mii_bus, addr); - if (phydev) + if (phydev) { phydev->mac_managed_pm =3D true; + phy_suspend(phydev); + } } =20 mii_cnt++; --=20 2.43.0