From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6AFEA4547F for ; Mon, 17 Jun 2024 11:53:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2001D40E0C; Mon, 17 Jun 2024 11:53:45 +0200 (CEST) Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by mails.dpdk.org (Postfix) with ESMTP id 453044066E; Mon, 17 Jun 2024 11:53:39 +0200 (CEST) X-QQ-mid: bizesmtpsz13t1718618017t7zrwb X-QQ-Originating-IP: ABDaFFxdIFHx5RfzwmMFpZZR1y3pwss1X59OCw65fD0= Received: from lap-jiawenwu.trustnetic.com ( [183.159.97.141]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 17 Jun 2024 17:53:37 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6454214476117440373 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Subject: [PATCH 08/19] net/ngbe: keep PHY power down while device probing Date: Mon, 17 Jun 2024 17:53:18 +0800 Message-Id: <20240617095319.16664-9-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20240617095319.16664-1-jiawenwu@trustnetic.com> References: <20240617095319.16664-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpsz:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org The internal PHY will be set to default power down after LAN reset, but the external PHY will not. To keep the PHY behavior consistent, set PHY power down uniformly here. Fixes: 708ebe7d0399 ("net/ngbe: fix external PHY power down") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/ngbe/base/ngbe_devids.h | 1 + drivers/net/ngbe/base/ngbe_hw.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/net/ngbe/base/ngbe_devids.h b/drivers/net/ngbe/base/ngbe_devids.h index 83eedf423e..e1efa62015 100644 --- a/drivers/net/ngbe/base/ngbe_devids.h +++ b/drivers/net/ngbe/base/ngbe_devids.h @@ -83,6 +83,7 @@ #define NGBE_YT8521S_SFP_GPIO 0x0062 #define NGBE_INTERNAL_YT8521S_SFP_GPIO 0x0064 #define NGBE_LY_YT8521S_SFP 0x0070 +#define NGBE_RGMII_FPGA 0x0080 #define NGBE_WOL_SUP 0x4000 #define NGBE_NCSI_SUP 0x8000 diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c index 22ccdb0b7d..4dced0d328 100644 --- a/drivers/net/ngbe/base/ngbe_hw.c +++ b/drivers/net/ngbe/base/ngbe_hw.c @@ -173,6 +173,9 @@ s32 ngbe_reset_hw_em(struct ngbe_hw *hw) ngbe_reset_misc_em(hw); hw->mac.clear_hw_cntrs(hw); + if (!((hw->sub_device_id & NGBE_OEM_MASK) == NGBE_RGMII_FPGA)) + hw->phy.set_phy_power(hw, false); + msec_delay(50); /* Store the permanent mac address */ -- 2.27.0