patch 'net/axgbe: fix linkup in PHY status' has been queued to stable release 21.11.8

Kevin Traynor ktraynor at redhat.com
Fri Aug 23 18:17:35 CEST 2024


Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. 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/c2baa4b8da3005ad18a1ec2e4c1267c5f399b111

Thanks.

Kevin

---
>From c2baa4b8da3005ad18a1ec2e4c1267c5f399b111 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande at amd.com>
Date: Tue, 4 Jun 2024 17:41:45 +0530
Subject: [PATCH] net/axgbe: fix linkup in PHY status

[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ]

In the event of a change in axgbe mode, the current auto-negotiation
needs to be reset and the AN cycle needs to be re-triggered. However,
the current code ignores the return value of axgbe_set_mode(), leading
to false information as the link is declared without checking the status
register.

Fix this by propagating the mode switch status information to
axgbe_phy_status().

Fixes: 102b6ec3d5c3 ("net/axgbe: support auto-negotiation for 1Gbps")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande at amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian at amd.com>
---
 drivers/net/axgbe/axgbe_mdio.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index e573ecc4d9..ce449f3ed6 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -236,11 +236,12 @@ static void axgbe_switch_mode(struct axgbe_port *pdata)
 }
 
-static void axgbe_set_mode(struct axgbe_port *pdata,
+static bool axgbe_set_mode(struct axgbe_port *pdata,
 			   enum axgbe_mode mode)
 {
 	if (mode == axgbe_cur_mode(pdata))
-		return;
+		return false;
 
 	axgbe_change_mode(pdata, mode);
+	return true;
 }
 
@@ -1040,5 +1041,5 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata)
 }
 
-static void axgbe_phy_status_result(struct axgbe_port *pdata)
+static bool axgbe_phy_status_result(struct axgbe_port *pdata)
 {
 	enum axgbe_mode mode;
@@ -1074,5 +1075,8 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata)
 	pdata->phy.duplex = DUPLEX_FULL;
 
-	axgbe_set_mode(pdata, mode);
+	if (axgbe_set_mode(pdata, mode))
+		return true;
+	else
+		return false;
 }
 
@@ -1141,5 +1145,8 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
 			}
 		}
-		axgbe_phy_status_result(pdata);
+
+		if (axgbe_phy_status_result(pdata))
+			return;
+
 		if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state))
 			rte_bit_relaxed_clear32(AXGBE_LINK_INIT,
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.785123035 +0100
+++ 0027-net-axgbe-fix-linkup-in-PHY-status.patch	2024-08-23 17:18:09.646429847 +0100
@@ -1 +1 @@
-From 50362d0e1f386563a026b314bd0a7eedcd188910 Mon Sep 17 00:00:00 2001
+From c2baa4b8da3005ad18a1ec2e4c1267c5f399b111 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index e1a737cf62..d95a52659e 100644
+index e573ecc4d9..ce449f3ed6 100644
@@ -28 +29 @@
-@@ -201,11 +201,12 @@ static void axgbe_switch_mode(struct axgbe_port *pdata)
+@@ -236,11 +236,12 @@ static void axgbe_switch_mode(struct axgbe_port *pdata)
@@ -43 +44 @@
-@@ -1008,5 +1009,5 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata)
+@@ -1040,5 +1041,5 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata)
@@ -50 +51 @@
-@@ -1042,5 +1043,8 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata)
+@@ -1074,5 +1075,8 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata)
@@ -60 +61 @@
-@@ -1109,5 +1113,8 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
+@@ -1141,5 +1145,8 @@ static void axgbe_phy_status(struct axgbe_port *pdata)



More information about the stable mailing list