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 2DCD545489 for ; Tue, 18 Jun 2024 09:12:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBA7641157; Tue, 18 Jun 2024 09:12:40 +0200 (CEST) Received: from smtpbg150.qq.com (smtpbg150.qq.com [18.132.163.193]) by mails.dpdk.org (Postfix) with ESMTP id 7949540DDC; Tue, 18 Jun 2024 09:12:15 +0200 (CEST) X-QQ-mid: bizesmtpsz1t1718694733tdy3299 X-QQ-Originating-IP: 3XqmPrY5VkTF85zHkJjgSuJkxsWDxiOyAE4CZRVWPhQ= Received: from lap-jiawenwu.trustnetic.com ( [183.159.97.141]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 18 Jun 2024 15:12:12 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6266101814820005736 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: Tue, 18 Jun 2024 15:11:39 +0800 Message-Id: <20240618071150.21564-9-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20240618071150.21564-1-jiawenwu@trustnetic.com> References: <20240618071150.21564-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