Skip to content

Commit d58faa9

Browse files
author
Shruti Parab
committed
bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code
JIRA: https://issues.redhat.com/browse/RHEL-76568 commit 8ff6175 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed Apr 23 18:28:21 2025 +0200 bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code The CONFIG_DEFAULT_HUNG_TASK_TIMEOUT setting is only available when the hung task detection is enabled, otherwise the code now produces a build failure: drivers/net/ethernet/broadcom/bnxt/bnxt.c:10188:21: error: use of undeclared identifier 'CONFIG_DEFAULT_HUNG_TASK_TIMEOUT' 10188 | max_tmo_secs > CONFIG_DEFAULT_HUNG_TASK_TIMEOUT) { Enclose this warning logic in an #ifdef to ensure this builds. Fixes: 0fcad44 ("bnxt_en: Change FW message timeout warning") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20250423162827.2189658-1-arnd@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Shruti Parab <shruti.parab@broadcom.com>
1 parent 49d6087 commit d58faa9

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10117,11 +10117,13 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)
1011710117
if (!bp->hwrm_cmd_max_timeout)
1011810118
bp->hwrm_cmd_max_timeout = HWRM_CMD_MAX_TIMEOUT;
1011910119
max_tmo_secs = bp->hwrm_cmd_max_timeout / 1000;
10120+
#ifdef CONFIG_DETECT_HUNG_TASK
1012010121
if (bp->hwrm_cmd_max_timeout > HWRM_CMD_MAX_TIMEOUT ||
1012110122
max_tmo_secs > CONFIG_DEFAULT_HUNG_TASK_TIMEOUT) {
1012210123
netdev_warn(bp->dev, "Device requests max timeout of %d seconds, may trigger hung task watchdog (kernel default %ds)\n",
1012310124
max_tmo_secs, CONFIG_DEFAULT_HUNG_TASK_TIMEOUT);
1012410125
}
10126+
#endif
1012510127

1012610128
if (resp->hwrm_intf_maj_8b >= 1) {
1012710129
bp->hwrm_max_req_len = le16_to_cpu(resp->max_req_win_len);

0 commit comments

Comments
 (0)