[9/9] net/txgbe: fix KR auto-negotiation

Message ID 20220208101129.69173-10-jiawenwu@trustnetic.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series Wangxun fixes and supports |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
ci/github-robot: build fail github build: failed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing fail Testing issues
ci/iol-aarch64-compile-testing fail Testing issues
ci/iol-aarch64-unit-testing fail Testing issues
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues

Commit Message

Jiawen Wu Feb. 8, 2022, 10:11 a.m. UTC
  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 <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_phy.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

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);