patch 'net/txgbe: use requested speed in E56 AN setup' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:04:28 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/da9e36ecd61bd43695486d00c059b1889394c3d3
Thanks.
Kevin
---
>From da9e36ecd61bd43695486d00c059b1889394c3d3 Mon Sep 17 00:00:00 2001
From: Zaiyu Wang <zaiyuwang at trustnetic.com>
Date: Wed, 28 Oct 2026 18:33:51 +0800
Subject: [PATCH] net/txgbe: use requested speed in E56 AN setup
[ upstream commit 806bd219071d2416e83639523ba3768c2f2b217a ]
txgbe_e56_set_phy_link_mode() takes the speeds to advertise, but the
port does not use the argument: it is passed to
UNREFERENCED_PARAMETER(), and the AN base page is built from the
device id and from hw->phy.fiber_suppport_speed instead. The caller
therefore cannot narrow what is advertised, which is what kept a
10G request from reaching the base page on a 10G/40G part even
after the capability mask had been opened up.
Take the argument as a speed bitmask, gate the 10G, 25G, and 40G
advertisement on the requested speed and use speed rather than
hw->phy.fiber_suppport_speed on the fiber/DAC path.
Both Amber-Lite MACs support 10GBASE-KR in addition to their nominal
speed: the capability masks already report 10G|25G for the 25G MAC
and 10G|40G for the 40G MAC, while the AN base page advertised
exactly one speed picked from the device id. With automatic speed
selection asking for 10G|40G on the 40G MAC as it already did 10G|25G
on the 25G MAC, the base page advertises 10GBASE-KR together with
25GBASE-KR/CR on the 25G MAC and together with 40GBASE-KR4/CR4 on the
40G MAC. Explicit speed requests advertise only the requested modes.
The AN restart paths also have no record of the caller speed to
re-apply. Record it in hw->phy.autoneg_advertised before setup_link(),
and pass it from the watchdog and training-restart paths instead of
the hardcoded 10. The two readers of that field keep their existing
fallback to get_link_capabilities() when it is zero.
Fixes: 234ce0d1fa9d ("net/txgbe: fix link stability for Amber-Lite backplane mode")
Signed-off-by: Zaiyu Wang <zaiyuwang at trustnetic.com>
---
drivers/net/txgbe/base/txgbe_aml40.c | 2 +-
drivers/net/txgbe/base/txgbe_e56_bp.c | 23 +++++++++++------------
drivers/net/txgbe/base/txgbe_e56_bp.h | 2 +-
drivers/net/txgbe/txgbe_ethdev.c | 16 ++++++++++++----
4 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/drivers/net/txgbe/base/txgbe_aml40.c b/drivers/net/txgbe/base/txgbe_aml40.c
index 7c72b53f64..7476759d4d 100644
--- a/drivers/net/txgbe/base/txgbe_aml40.c
+++ b/drivers/net/txgbe/base/txgbe_aml40.c
@@ -173,5 +173,5 @@ s32 txgbe_setup_phy_link_aml40(struct txgbe_hw *hw,
return status;
rte_spinlock_lock(&hw->phy_lock);
- txgbe_e56_set_phy_link_mode(hw, 40, autoneg_wait_to_complete);
+ txgbe_e56_set_phy_link_mode(hw, speed, autoneg_wait_to_complete);
rte_spinlock_unlock(&hw->phy_lock);
return status;
diff --git a/drivers/net/txgbe/base/txgbe_e56_bp.c b/drivers/net/txgbe/base/txgbe_e56_bp.c
index d376d918df..760101a05e 100644
--- a/drivers/net/txgbe/base/txgbe_e56_bp.c
+++ b/drivers/net/txgbe/base/txgbe_e56_bp.c
@@ -2092,11 +2092,9 @@ static int txgbe_set_phy_link_mode(struct txgbe_hw *hw,
int txgbe_e56_set_phy_link_mode(struct txgbe_hw *hw,
- u8 bp_link_mode, u32 need_restart)
+ u32 speed, u32 need_restart)
{
int status = 0;
u32 rdata;
- UNREFERENCED_PARAMETER(bp_link_mode);
-
hw->an_done = false;
if (hw->curbp_link_mode == 10 && !need_restart)
@@ -2131,12 +2129,16 @@ int txgbe_e56_set_phy_link_mode(struct txgbe_hw *hw,
/* 10GKR:7-25KR:14/15-40GKR:8-40GCR:9 */
/* default all speed */
- if ((hw->device_id & 0xFF) == 0x10) {
+ if (speed & TXGBE_LINK_SPEED_10GB_FULL) {
backplane_mode |= BIT(7);
fec_advertise |= TXGBE_10G_FEC_ABL;
- } else if ((hw->device_id & 0xFF) == 0x25) {
+ }
+
+ if (speed & TXGBE_LINK_SPEED_25GB_FULL) {
backplane_mode |= BIT(14) | BIT(15);
fec_advertise |= TXGBE_25G_RS_FEC_REQ |
TXGBE_25G_BASE_FEC_REQ;
- } else if ((hw->device_id & 0xFF) == 0x40) {
+ }
+
+ if (speed & TXGBE_LINK_SPEED_40GB_FULL) {
if (hw->phy.bp_capa == 0)
/* original configure: KR4 + CR4 */
@@ -2152,12 +2154,10 @@ int txgbe_e56_set_phy_link_mode(struct txgbe_hw *hw,
}
} else {
- if ((hw->phy.fiber_suppport_speed & TXGBE_LINK_SPEED_10GB_FULL)
- == TXGBE_LINK_SPEED_10GB_FULL) {
+ if (speed & TXGBE_LINK_SPEED_10GB_FULL) {
backplane_mode |= 0x80;
fec_advertise |= TXGBE_10G_FEC_ABL;
}
- if ((hw->phy.fiber_suppport_speed & TXGBE_LINK_SPEED_25GB_FULL)
- == TXGBE_LINK_SPEED_25GB_FULL) {
+ if (speed & TXGBE_LINK_SPEED_25GB_FULL) {
backplane_mode |= 0xc000;
fec_advertise |= TXGBE_25G_RS_FEC_REQ |
@@ -2165,6 +2165,5 @@ int txgbe_e56_set_phy_link_mode(struct txgbe_hw *hw,
}
- if ((hw->phy.fiber_suppport_speed & TXGBE_LINK_SPEED_40GB_FULL)
- == TXGBE_LINK_SPEED_40GB_FULL) {
+ if (speed & TXGBE_LINK_SPEED_40GB_FULL) {
backplane_mode |= BIT(9) | BIT(8);
fec_advertise |= TXGBE_10G_FEC_ABL;
diff --git a/drivers/net/txgbe/base/txgbe_e56_bp.h b/drivers/net/txgbe/base/txgbe_e56_bp.h
index d2c49c2fce..8089e5b971 100644
--- a/drivers/net/txgbe/base/txgbe_e56_bp.h
+++ b/drivers/net/txgbe/base/txgbe_e56_bp.h
@@ -278,5 +278,5 @@ typedef union {
int txgbe_e56_set_phy_link_mode(struct txgbe_hw *hw,
- u8 bp_link_mode, u32 need_restart);
+ u32 speed, u32 need_restart);
int txgbe_handle_e56_bkp_an73_flow(struct txgbe_hw *hw);
#endif
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 37ed3f6898..5cd95f3b6f 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -1919,5 +1919,6 @@ txgbe_dev_start(struct rte_eth_dev *dev)
if (*link_speeds == RTE_ETH_LINK_SPEED_AUTONEG) {
if (hw->mac.type == txgbe_mac_aml40) {
- speed = TXGBE_LINK_SPEED_40GB_FULL;
+ speed = TXGBE_LINK_SPEED_10GB_FULL |
+ TXGBE_LINK_SPEED_40GB_FULL;
} else if (hw->mac.type == txgbe_mac_aml) {
speed = (TXGBE_LINK_SPEED_10GB_FULL |
@@ -1943,4 +1944,9 @@ txgbe_dev_start(struct rte_eth_dev *dev)
}
+ /* Record the caller speed first: the AN restart paths re-apply it. */
+ hw->phy.autoneg_advertised = speed & (TXGBE_LINK_SPEED_10GB_FULL |
+ TXGBE_LINK_SPEED_25GB_FULL |
+ TXGBE_LINK_SPEED_40GB_FULL);
+
err = hw->mac.setup_link(hw, speed, link_up);
if (err)
@@ -3024,5 +3030,5 @@ void txgbe_dev_e56_check_bp_event(void *param)
wr32_epcs(hw, VR_AN_INTR, value);
rte_spinlock_lock(&hw->phy_lock);
- txgbe_e56_set_phy_link_mode(hw, 10, hw->bypass_ctle);
+ txgbe_e56_set_phy_link_mode(hw, hw->phy.autoneg_advertised, hw->bypass_ctle);
rte_spinlock_unlock(&hw->phy_lock);
goto an_status;
@@ -3039,5 +3045,6 @@ void txgbe_dev_e56_check_bp_event(void *param)
BP_LOG("Training FAILED, do reset\n");
rte_spinlock_lock(&hw->phy_lock);
- txgbe_e56_set_phy_link_mode(hw, 10, hw->bypass_ctle);
+ txgbe_e56_set_phy_link_mode(hw, hw->phy.autoneg_advertised,
+ hw->bypass_ctle);
rte_spinlock_unlock(&hw->phy_lock);
} else {
@@ -3048,5 +3055,6 @@ void txgbe_dev_e56_check_bp_event(void *param)
BP_LOG("Training FAILED, do reset\n");
rte_spinlock_lock(&hw->phy_lock);
- txgbe_e56_set_phy_link_mode(hw, 10, hw->bypass_ctle);
+ txgbe_e56_set_phy_link_mode(hw, hw->phy.autoneg_advertised,
+ hw->bypass_ctle);
rte_spinlock_unlock(&hw->phy_lock);
} else {
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:48.866739786 +0000
+++ 0342-net-txgbe-use-requested-speed-in-E56-AN-setup.patch 2026-12-03 12:52:39.261938759 +0000
@@ -1 +1 @@
-From 806bd219071d2416e83639523ba3768c2f2b217a Mon Sep 17 00:00:00 2001
+From da9e36ecd61bd43695486d00c059b1889394c3d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 806bd219071d2416e83639523ba3768c2f2b217a ]
+
@@ -34 +35,0 @@
-Cc: stable at dpdk.org
@@ -127 +128 @@
-index d4c635dc2f..f20e57125d 100644
+index 37ed3f6898..5cd95f3b6f 100644
@@ -130 +131 @@
-@@ -1865,5 +1865,6 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1919,5 +1919,6 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -138 +139 @@
-@@ -1889,4 +1890,9 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1943,4 +1944,9 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -148 +149 @@
-@@ -2952,5 +2958,5 @@ void txgbe_dev_e56_check_bp_event(void *param)
+@@ -3024,5 +3030,5 @@ void txgbe_dev_e56_check_bp_event(void *param)
@@ -155 +156 @@
-@@ -2967,5 +2973,6 @@ void txgbe_dev_e56_check_bp_event(void *param)
+@@ -3039,5 +3045,6 @@ void txgbe_dev_e56_check_bp_event(void *param)
@@ -163 +164 @@
-@@ -2976,5 +2983,6 @@ void txgbe_dev_e56_check_bp_event(void *param)
+@@ -3048,5 +3055,6 @@ void txgbe_dev_e56_check_bp_event(void *param)
More information about the stable
mailing list