Skip to content

Commit ee69241

Browse files
author
Shruti Parab
committed
bnxt_en: Change FW message timeout warning
JIRA: https://issues.redhat.com/browse/RHEL-76565 commit 0fcad44 Author: Michael Chan <michael.chan@broadcom.com> Date: Thu Apr 17 10:24:45 2025 -0700 bnxt_en: Change FW message timeout warning The firmware advertises a "hwrm_cmd_max_timeout" value to the driver for NVRAM and coredump related functions that can take tens of seconds to complete. The driver polls for the operation to complete under mutex and may trigger hung task watchdog warning if the wait is too long. To warn the user about this, the driver currently prints a warning if this advertised value exceeds 40 seconds: Device requests max timeout of %d seconds, may trigger hung task watchdog Initially, we chose 40 seconds, well below the kernel's default CONFIG_DEFAULT_HUNG_TASK_TIMEOUT (120 seconds) to avoid triggering the hung task watchdog. But 60 seconds is the timeout on most production FW and cannot be reduced further. Change the driver's warning threshold to 60 seconds to avoid triggering this warning on all production devices. We also print the warning if the value exceeds CONFIG_DEFAULT_HUNG_TASK_TIMEOUT which may be set to architecture specific defaults as low as 10 seconds. Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20250417172448.1206107-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Shruti Parab <shruti.parab@broadcom.com>
1 parent 71a753c commit ee69241

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10038,7 +10038,7 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)
1003810038
struct hwrm_ver_get_input *req;
1003910039
u16 fw_maj, fw_min, fw_bld, fw_rsv;
1004010040
u32 dev_caps_cfg, hwrm_ver;
10041-
int rc, len;
10041+
int rc, len, max_tmo_secs;
1004210042

1004310043
rc = hwrm_req_init(bp, req, HWRM_VER_GET);
1004410044
if (rc)
@@ -10111,9 +10111,12 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)
1011110111
bp->hwrm_cmd_max_timeout = le16_to_cpu(resp->max_req_timeout) * 1000;
1011210112
if (!bp->hwrm_cmd_max_timeout)
1011310113
bp->hwrm_cmd_max_timeout = HWRM_CMD_MAX_TIMEOUT;
10114-
else if (bp->hwrm_cmd_max_timeout > HWRM_CMD_MAX_TIMEOUT)
10115-
netdev_warn(bp->dev, "Device requests max timeout of %d seconds, may trigger hung task watchdog\n",
10116-
bp->hwrm_cmd_max_timeout / 1000);
10114+
max_tmo_secs = bp->hwrm_cmd_max_timeout / 1000;
10115+
if (bp->hwrm_cmd_max_timeout > HWRM_CMD_MAX_TIMEOUT ||
10116+
max_tmo_secs > CONFIG_DEFAULT_HUNG_TASK_TIMEOUT) {
10117+
netdev_warn(bp->dev, "Device requests max timeout of %d seconds, may trigger hung task watchdog (kernel default %ds)\n",
10118+
max_tmo_secs, CONFIG_DEFAULT_HUNG_TASK_TIMEOUT);
10119+
}
1011710120

1011810121
if (resp->hwrm_intf_maj_8b >= 1) {
1011910122
bp->hwrm_max_req_len = le16_to_cpu(resp->max_req_win_len);

drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void hwrm_update_token(struct bnxt *bp, u16 seq, enum bnxt_hwrm_wait_state s);
5858

5959
#define BNXT_HWRM_MAX_REQ_LEN (bp->hwrm_max_req_len)
6060
#define BNXT_HWRM_SHORT_REQ_LEN sizeof(struct hwrm_short_input)
61-
#define HWRM_CMD_MAX_TIMEOUT 40000U
61+
#define HWRM_CMD_MAX_TIMEOUT 60000U
6262
#define SHORT_HWRM_CMD_TIMEOUT 20
6363
#define HWRM_CMD_TIMEOUT (bp->hwrm_cmd_timeout)
6464
#define HWRM_RESET_TIMEOUT ((HWRM_CMD_TIMEOUT) * 4)

0 commit comments

Comments
 (0)