Skip to contentSkip to conversation

bnxt_en: 3 Bug fixes

PATCH Applied Michael Chan 3 participants 9 messages Mar 29, 2023 – Mar 30, 2023

Subsystems (3)
lore
Share & tools
lore

Michael Chan

author maintainer
#0 lore raw

cover bnxt_en: 3 Bug fixes

This series contains 3 small bug fixes covering ethtool self test, PCI ID string typos, and some missing 200G link speed ethtool reporting logic.

Kalesh AP (2):
bnxt_en: Fix reporting of test result in ethtool selftest
bnxt_en: Fix typo in PCI id to device description string mapping

Michael Chan (1):
bnxt_en: Add missing 200G link speed reporting

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 8 ++++----
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         | 1 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 +++
 3 files changed, 8 insertions(+), 4 deletions(-)
Signature · 1 line
2.18.1
author maintainer
#1 lore raw

PATCH 1/3 bnxt_en: Fix reporting of test result in ethtool selftest

From: Kalesh AP <[email protected]>

When the selftest command fails, driver is not reporting the failure by updating the "test->flags" when bnxt_close_nic() fails.

Fixes eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +1 -0
index ec573127b707..7658a06b8d05 100644
@@ -3738,6 +3738,7 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest,
 		bnxt_ulp_stop(bp);
 		rc = bnxt_close_nic(bp, true, false);
 		if (rc) {
+			etest->flags |= ETH_TEST_FL_FAILED;
 			bnxt_ulp_start(bp, rc);
 			return;
 		}
Signature · 1 line
2.18.1
Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH net 1/3] bnxt_en: Fix reporting of test result in ethtool selftest

Quoted 10 lines · Michael Chan

From: Kalesh AP <[email protected]>

When the selftest command fails, driver is not reporting the failure by updating the "test->flags" when bnxt_close_nic() fails.

Fixes eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.")

Note: I think this will require a manual backport to get
all the way back to the above referenced commit (v4.12). I'm unsure if that will need to be addressed in practice.

Quoted 19 lines
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +1 -0
index ec573127b707..7658a06b8d05 100644
@@ -3738,6 +3738,7 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest,
 		bnxt_ulp_stop(bp);
 		rc = bnxt_close_nic(bp, true, false);
 		if (rc) {
+			etest->flags |= ETH_TEST_FL_FAILED;
 			bnxt_ulp_start(bp, rc);
 			return;
 		}
Signature · 1 line
2.18.1
author maintainer
#3 lore raw

Re: [PATCH net 1/3] bnxt_en: Fix reporting of test result in ethtool selftest

Quoted 13 lines · Simon Horman
Quoted 10 lines · Michael Chan

From: Kalesh AP <[email protected]>

When the selftest command fails, driver is not reporting the failure by updating the "test->flags" when bnxt_close_nic() fails.

Fixes eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.")
Quoted 5 lines

Note: I think this will require a manual backport to get
all the way back to the above referenced commit (v4.12). I'm unsure if that will need to be addressed in practice.

Thanks for the review. The manual backport should be relatively trivial. But I agree that it may not be necessary to backport all the way back for this minor issue.

author maintainer
#4 lore raw

PATCH 2/3 bnxt_en: Fix typo in PCI id to device description string mapping

In reply to Michael Chan

From: Kalesh AP <[email protected]>

Fix 57502 and 57508 NPAR description string entries. The typos caused these devices to not match up with lspci output.

Fixes 49c98421e6ab ("bnxt_en: Add PCI IDs for 57500 series NPAR devices.")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +4 -4
index e2e2c986c82b..c23e3b397bcf 100644
@@ -175,12 +175,12 @@ static const struct pci_device_id bnxt_pci_tbl[] = {
 	{ PCI_VDEVICE(BROADCOM, 0x1750), .driver_data = BCM57508 },
 	{ PCI_VDEVICE(BROADCOM, 0x1751), .driver_data = BCM57504 },
 	{ PCI_VDEVICE(BROADCOM, 0x1752), .driver_data = BCM57502 },
-	{ PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57508_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57502_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x1801), .driver_data = BCM57504_NPAR },
-	{ PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57502_NPAR },
-	{ PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57508_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57508_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57502_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x1804), .driver_data = BCM57504_NPAR },
-	{ PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57502_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57508_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0xd802), .driver_data = BCM58802 },
 	{ PCI_VDEVICE(BROADCOM, 0xd804), .driver_data = BCM58804 },
 #ifdef CONFIG_BNXT_SRIOV
Signature · 1 line
2.18.1
Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH net 2/3] bnxt_en: Fix typo in PCI id to device description string mapping

Quoted 9 lines · Michael Chan

From: Kalesh AP <[email protected]>

Fix 57502 and 57508 NPAR description string entries. The typos caused these devices to not match up with lspci output.

Fixes 49c98421e6ab ("bnxt_en: Add PCI IDs for 57500 series NPAR devices.")

Note: I checked that this corresponds to

      https://pci-ids.ucw.cz/read/PC/14e4
Quoted 28 lines
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +4 -4
index e2e2c986c82b..c23e3b397bcf 100644
@@ -175,12 +175,12 @@ static const struct pci_device_id bnxt_pci_tbl[] = {
 	{ PCI_VDEVICE(BROADCOM, 0x1750), .driver_data = BCM57508 },
 	{ PCI_VDEVICE(BROADCOM, 0x1751), .driver_data = BCM57504 },
 	{ PCI_VDEVICE(BROADCOM, 0x1752), .driver_data = BCM57502 },
-	{ PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57508_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57502_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x1801), .driver_data = BCM57504_NPAR },
-	{ PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57502_NPAR },
-	{ PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57508_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57508_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57502_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x1804), .driver_data = BCM57504_NPAR },
-	{ PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57502_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57508_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0xd802), .driver_data = BCM58802 },
 	{ PCI_VDEVICE(BROADCOM, 0xd804), .driver_data = BCM58804 },
 #ifdef CONFIG_BNXT_SRIOV
Signature · 1 line
2.18.1
author maintainer
#6 lore raw

PATCH 3/3 bnxt_en: Add missing 200G link speed reporting

In reply to Michael Chan

bnxt_fw_to_ethtool_speed() is missing the case statement for 200G link speed reported by firmware. As a result, ethtool will report unknown speed when the firmware reports 200G link speed.

Fixes 532262ba3b84 ("bnxt_en: ethtool: support PAM4 link speeds up to 200G")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         | 1 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 ++
 2 files changed, 3 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -0
index c0628ac1b798..5928430f6f51 100644
@@ -1226,6 +1226,7 @@ struct bnxt_link_info {
 #define BNXT_LINK_SPEED_40GB	PORT_PHY_QCFG_RESP_LINK_SPEED_40GB
 #define BNXT_LINK_SPEED_50GB	PORT_PHY_QCFG_RESP_LINK_SPEED_50GB
 #define BNXT_LINK_SPEED_100GB	PORT_PHY_QCFG_RESP_LINK_SPEED_100GB
+#define BNXT_LINK_SPEED_200GB	PORT_PHY_QCFG_RESP_LINK_SPEED_200GB
 	u16			support_speeds;
 	u16			support_pam4_speeds;
 	u16			auto_link_speeds;	/* fw adv setting */
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +2 -0
index 7658a06b8d05..6bd18eb5137f 100644
@@ -1714,6 +1714,8 @@ u32 bnxt_fw_to_ethtool_speed(u16 fw_link_speed)
 		return SPEED_50000;
 	case BNXT_LINK_SPEED_100GB:
 		return SPEED_100000;
+	case BNXT_LINK_SPEED_200GB:
+		return SPEED_200000;
 	default:
 		return SPEED_UNKNOWN;
 	}
Signature · 1 line
2.18.1
Reviewed-by on v1 3/3
#7 lore raw

Re: [PATCH net 3/3] bnxt_en: Add missing 200G link speed reporting

Quoted 6 lines · Michael Chan

bnxt_fw_to_ethtool_speed() is missing the case statement for 200G link speed reported by firmware. As a result, ethtool will report unknown speed when the firmware reports 200G link speed.

Fixes 532262ba3b84 ("bnxt_en: ethtool: support PAM4 link speeds up to 200G")
#8 lore raw
In reply to Michael Chan
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Tue, 28 Mar 2023 18:30:18 -0700 you wrote:

This series contains 3 small bug fixes covering ethtool self test, PCI ID string typos, and some missing 200G link speed ethtool reporting logic.

Kalesh AP (2):
bnxt_en: Fix reporting of test result in ethtool selftest
bnxt_en: Fix typo in PCI id to device description string mapping

[...]

Here is the summary with links:
- [net,1/3] bnxt_en: Fix reporting of test result in ethtool selftest

    https://git.kernel.org/netdev/net/c/83714dc3db0e
  - [net,2/3] bnxt_en: Fix typo in PCI id to device description string mapping
    https://git.kernel.org/netdev/net/c/62aad36ed31a
  - [net,3/3] bnxt_en: Add missing 200G link speed reporting
    https://git.kernel.org/netdev/net/c/581bce7bcb7e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html