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 819BEA04A6 for ; Wed, 9 Feb 2022 11:36:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9EEF411A4; Wed, 9 Feb 2022 11:36:05 +0100 (CET) Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by mails.dpdk.org (Postfix) with ESMTP id AC84041141 for ; Wed, 9 Feb 2022 11:36:03 +0100 (CET) X-QQ-mid: bizesmtp37t1644402956tjbs2pqh Received: from wxdbg.localdomain.com (unknown [183.129.236.74]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 09 Feb 2022 18:35:56 +0800 (CST) X-QQ-SSF: 01400000002000F0L000B00A0000000 X-QQ-FEAT: jmpb/TFoY7rghX7nK2XpuIUUwokASeapyw8w9kqaZG2pVP+DFBkR1ah7jGv5L /7IeZiWSgawuGFxc0Wi++8mBs9RIxivH5gNS9wf0N+hCPVTvGSe+hDilsOCrO/cgkLILj4d peM9DaPbI9Yj05kzD3haN/uSJUzhe9BGimoH/N5aYOZAGiA40M6/FaoOGvmkMFt7KNrJ6tU JFuVu85L/CuEmKN5c+pLbR/Dg7BUMHbcX2zozqoPXFLcx8JhJe1M/Fna/4WMygpUCw4+h8T SLxmgQ/a7eAvUVFPx6a9WP+iFfoSzCx/pjp4kW/SmuK0DUoYSt0H9JM07qIqlzFeKEHlAhS Mpq5iQ4iBMf+WjEwyvbGpJd830agngiofPUTwta4Y9du9LuEVA= X-QQ-GoodBg: 2 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Subject: [PATCH v2 12/12] net/txgbe: fix KR auto-negotiation Date: Wed, 9 Feb 2022 18:42:13 +0800 Message-Id: <20220209104213.602728-13-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220209104213.602728-1-jiawenwu@trustnetic.com> References: <20220209104213.602728-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 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 Fix failure to enter auto-negotiation mode on some firmware versions for KR NICs. Fixes: f611dada1af8 ("net/txgbe: update link setup process of backplane NICs") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/txgbe/base/txgbe_phy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c index 3f5229ecc2..3fb929f37a 100644 --- a/drivers/net/txgbe/base/txgbe_phy.c +++ b/drivers/net/txgbe/base/txgbe_phy.c @@ -1455,6 +1455,10 @@ txgbe_set_link_to_kr(struct txgbe_hw *hw, bool autoneg) if (!(hw->devarg.auto_neg == 1)) { wr32_epcs(hw, SR_AN_CTRL, 0); wr32_epcs(hw, VR_AN_KR_MODE_CL, 0); + } else { + value = rd32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1); + value &= ~(1 << 6); + wr32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1, value); } if (hw->devarg.present == 1) { value = rd32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1); -- 2.21.0.windows.1