netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] bnxt_en: 2 bug fixes.
@ 2021-02-11  7:24 Michael Chan
  2021-02-11  7:24 ` [PATCH net 1/2] bnxt_en: reverse order of TX disable and carrier off Michael Chan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Chan @ 2021-02-11  7:24 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, gospo

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(-)

-- 
2.18.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net 1/2] bnxt_en: reverse order of TX disable and carrier off
  2021-02-11  7:24 [PATCH net 0/2] bnxt_en: 2 bug fixes Michael Chan
@ 2021-02-11  7:24 ` Michael Chan
  2021-02-11  7:24 ` [PATCH net 2/2] bnxt_en: Fix devlink info's stored fw.psid version format Michael Chan
  2021-02-11 22:50 ` [PATCH net 0/2] bnxt_en: 2 bug fixes patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Chan @ 2021-02-11  7:24 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, gospo

From: Edwin Peer <edwin.peer@broadcom.com>

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.")
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index d10e4f85dd11..1c96b7ba24f2 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -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)
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net 2/2] bnxt_en: Fix devlink info's stored fw.psid version format.
  2021-02-11  7:24 [PATCH net 0/2] bnxt_en: 2 bug fixes Michael Chan
  2021-02-11  7:24 ` [PATCH net 1/2] bnxt_en: reverse order of TX disable and carrier off Michael Chan
@ 2021-02-11  7:24 ` Michael Chan
  2021-02-11 22:50 ` [PATCH net 0/2] bnxt_en: 2 bug fixes patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Chan @ 2021-02-11  7:24 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, gospo

From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>

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.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index 6b7b69ed62db..a9bcf887d2fb 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -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);
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net 0/2] bnxt_en: 2 bug fixes.
  2021-02-11  7:24 [PATCH net 0/2] bnxt_en: 2 bug fixes Michael Chan
  2021-02-11  7:24 ` [PATCH net 1/2] bnxt_en: reverse order of TX disable and carrier off Michael Chan
  2021-02-11  7:24 ` [PATCH net 2/2] bnxt_en: Fix devlink info's stored fw.psid version format Michael Chan
@ 2021-02-11 22:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-11 22:50 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev, kuba, gospo

Hello:

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

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-11 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-11  7:24 [PATCH net 0/2] bnxt_en: 2 bug fixes Michael Chan
2021-02-11  7:24 ` [PATCH net 1/2] bnxt_en: reverse order of TX disable and carrier off Michael Chan
2021-02-11  7:24 ` [PATCH net 2/2] bnxt_en: Fix devlink info's stored fw.psid version format Michael Chan
2021-02-11 22:50 ` [PATCH net 0/2] bnxt_en: 2 bug fixes patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).