Skip to contentSkip to conversation

bnxt_en: 2 bug fixes.

PATCH Applied Michael Chan 2 participants 4 messages Feb 11, 2021

Subsystems (3)
lore
Share & tools
lore

Michael Chan

author maintainer
#0 lore raw

cover bnxt_en: 2 bug fixes.

Two unrelated fixes. The first one fixes intermittent false TX timeouts during ring reconfigurations. The second one fixes a formatting discrepancy between the stored and the running FW versions.

Please also queue these for -stable. Thanks.

Edwin Peer (1):
bnxt_en: reverse order of TX disable and carrier off

Vasundhara Volam (1):
bnxt_en: Fix devlink info's stored fw.psid version format.

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

PATCH 1/2 bnxt_en: reverse order of TX disable and carrier off

From: Edwin Peer <[email protected]>

A TX queue can potentially immediately timeout after it is stopped and the last TX timestamp on that queue was more than 5 seconds ago with carrier still up. Prevent these intermittent false TX timeouts by bringing down carrier first before calling netif_tx_disable().

Fixes c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -1
index d10e4f85dd11..1c96b7ba24f2 100644
@@ -8856,9 +8856,10 @@ void bnxt_tx_disable(struct bnxt *bp)
 			txr->dev_state = BNXT_DEV_STATE_CLOSING;
 		}
 	}
+	/* Drop carrier first to prevent TX timeout */
+	netif_carrier_off(bp->dev);
 	/* Stop all TX queues */
 	netif_tx_disable(bp->dev);
-	netif_carrier_off(bp->dev);
 }
 
 void bnxt_tx_enable(struct bnxt *bp)
Signature · 1 line
2.18.1
author maintainer
#2 lore raw

PATCH 2/2 bnxt_en: Fix devlink info's stored fw.psid version format.

In reply to Michael Chan

From: Vasundhara Volam <[email protected]>

The running fw.psid version is in decimal format but the stored fw.psid is in hex format. This can mislead the user to reset the NIC to activate the stored version to become the running version.

Fix it to display the stored fw.psid in decimal format.

Fixes 1388875b3916 ("bnxt_en: Add stored FW version info to devlink info_get cb.")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +2 -2
index 6b7b69ed62db..a9bcf887d2fb 100644
@@ -472,8 +472,8 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
 	if (BNXT_PF(bp) && !bnxt_hwrm_get_nvm_cfg_ver(bp, &nvm_cfg_ver)) {
 		u32 ver = nvm_cfg_ver.vu32;
 
-		sprintf(buf, "%X.%X.%X", (ver >> 16) & 0xF, (ver >> 8) & 0xF,
-			ver & 0xF);
+		sprintf(buf, "%d.%d.%d", (ver >> 16) & 0xf, (ver >> 8) & 0xf,
+			ver & 0xf);
 		rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED,
 				      DEVLINK_INFO_VERSION_GENERIC_FW_PSID,
 				      buf);
Signature · 1 line
2.18.1
#3 lore raw
In reply to Michael Chan
This series was applied to netdev/net.git (refs/heads/master):

Hello:

This series was applied to netdev/net.git (refs/heads/master):

Quoted 10 lines · On Thu, 11 Feb 2021 02:24:22 -0500 you wrote:

Two unrelated fixes. The first one fixes intermittent false TX timeouts during ring reconfigurations. The second one fixes a formatting discrepancy between the stored and the running FW versions.

Please also queue these for -stable. Thanks.

Edwin Peer (1):
bnxt_en: reverse order of TX disable and carrier off

[...]

Here is the summary with links:
- [net,1/2] bnxt_en: reverse order of TX disable and carrier off

    https://git.kernel.org/netdev/net/c/132e0b65dc2b
  - [net,2/2] bnxt_en: Fix devlink info's stored fw.psid version format.
    https://git.kernel.org/netdev/net/c/db28b6c77f40

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html