patch 'net/bnxt: force PHY update on certain configurations' has been queued to stable release 20.11.6

Xueming Li xuemingl at nvidia.com
Tue Jun 21 10:01:55 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.11.6

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

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Wed, 27 Apr 2022 20:28:17 +0530
Subject: [PATCH] net/bnxt: force PHY update on certain configurations
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ]

Device is not obliged link down in certain scenarios, even
when forced. When FW does not allow any user other than the BMC
to shutdown the port, bnxt_get_hwrm_link_config() call always
returns link up. Force phy update always in that case,
else user configuration for speed/autoneg would not get applied
correctly.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  3 +--
 drivers/net/bnxt/bnxt_ethdev.c | 22 ++++++++++++++++++----
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 61bb59feb6..0696b8a99d 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -82,8 +82,7 @@
 #define BROADCOM_DEV_ID_58802_VF	0xd800
 
 #define BROADCOM_DEV_957508_N2100	0x5208
-#define IS_BNXT_DEV_957508_N2100(bp)	\
-	((bp)->pdev->id.subsystem_device_id == BROADCOM_DEV_957508_N2100)
+#define BROADCOM_DEV_957414_N225	0x4145
 
 #define BNXT_MAX_MTU		9574
 #define VLAN_TAG_SIZE		4
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fdcc73d432..742a020cae 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -670,6 +670,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp)
 	return rc;
 }
 
+static inline bool bnxt_force_link_config(struct bnxt *bp)
+{
+	uint16_t subsystem_device_id = bp->pdev->id.subsystem_device_id;
+
+	switch (subsystem_device_id) {
+	case BROADCOM_DEV_957508_N2100:
+	case BROADCOM_DEV_957414_N225:
+		return true;
+	default:
+		return false;
+	}
+}
+
 static int bnxt_update_phy_setting(struct bnxt *bp)
 {
 	struct rte_eth_link new;
@@ -682,11 +695,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
 	}
 
 	/*
-	 * On BCM957508-N2100 adapters, FW will not allow any user other
-	 * than BMC to shutdown the port. bnxt_get_hwrm_link_config() call
-	 * always returns link up. Force phy update always in that case.
+	 * Device is not obliged link down in certain scenarios, even
+	 * when forced. When FW does not allow any user other than BMC
+	 * to shutdown the port, bnxt_get_hwrm_link_config() call always
+	 * returns link up. Force phy update always in that case.
 	 */
-	if (!new.link_status || IS_BNXT_DEV_957508_N2100(bp)) {
+	if (!new.link_status || bnxt_force_link_config(bp)) {
 		rc = bnxt_set_hwrm_link_config(bp, true);
 		if (rc) {
 			PMD_DRV_LOG(ERR, "Failed to update PHY settings\n");
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.547524942 +0800
+++ 0049-net-bnxt-force-PHY-update-on-certain-configurations.patch	2022-06-21 15:37:49.064451347 +0800
@@ -1 +1 @@
-From 9c1410bed3d801a63c8c5b47d457a7f69e95e989 Mon Sep 17 00:00:00 2001
+From f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index e4e8e8ecf8..e86e51e1fa 100644
+index 61bb59feb6..0696b8a99d 100644
@@ -28,2 +30,2 @@
-@@ -72,8 +72,7 @@
- #define BROADCOM_DEV_ID_58818_VF	0xd82e
+@@ -82,8 +82,7 @@
+ #define BROADCOM_DEV_ID_58802_VF	0xd800
@@ -37 +39 @@
- #define BNXT_NUM_VLANS		2
+ #define VLAN_TAG_SIZE		4
@@ -39 +41 @@
-index 181de42d15..1904db93c4 100644
+index fdcc73d432..742a020cae 100644
@@ -42 +44 @@
-@@ -659,6 +659,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp)
+@@ -670,6 +670,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp)
@@ -62 +64 @@
-@@ -671,11 +684,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
+@@ -682,11 +695,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp)


More information about the stable mailing list