[PATCH 04/11] net/ngbe: prevent the NIC from slowing down link speed

Jiawen Wu jiawenwu at trustnetic.com
Thu Sep 28 11:47:51 CEST 2023


When the signal quality is bad, the internal PHY may slow down to 100M.
Fix this weird behavior by setting dis fall 100M bit.

Fixes: 696a82117875 ("net/ngbe: redesign internal PHY init flow")
Cc: stable at dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_phy_rtl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ngbe/base/ngbe_phy_rtl.c b/drivers/net/ngbe/base/ngbe_phy_rtl.c
index b0eb6c97c0..ba63a8058a 100644
--- a/drivers/net/ngbe/base/ngbe_phy_rtl.c
+++ b/drivers/net/ngbe/base/ngbe_phy_rtl.c
@@ -148,6 +148,11 @@ s32 ngbe_init_phy_rtl(struct ngbe_hw *hw)
 	hw->phy.write_reg(hw, 27, 0xa42, 0x8011);
 	hw->phy.write_reg(hw, 28, 0xa42, 0x5737);
 
+	/* Disable fall to 100m if signal is not good */
+	hw->phy.read_reg(hw, 17, 0xa44, &value);
+	value &= ~0x8;
+	hw->phy.write_reg(hw, 17, 0xa44, value);
+
 	hw->phy.write_reg(hw, RTL_SCR, 0xa46, RTL_SCR_EXTINI);
 	hw->phy.read_reg(hw, RTL_SCR, 0xa46, &value);
 	if (!(value & RTL_SCR_EXTINI)) {
-- 
2.27.0



More information about the dev mailing list