Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 0fcad44a86bd ("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>

authored by

Arnd Bergmann and committed by
Jakub Kicinski
8ff61751 88922fe7

+2
+2
drivers/net/ethernet/broadcom/bnxt/bnxt.c
··· 10184 10184 if (!bp->hwrm_cmd_max_timeout) 10185 10185 bp->hwrm_cmd_max_timeout = HWRM_CMD_MAX_TIMEOUT; 10186 10186 max_tmo_secs = bp->hwrm_cmd_max_timeout / 1000; 10187 + #ifdef CONFIG_DETECT_HUNG_TASK 10187 10188 if (bp->hwrm_cmd_max_timeout > HWRM_CMD_MAX_TIMEOUT || 10188 10189 max_tmo_secs > CONFIG_DEFAULT_HUNG_TASK_TIMEOUT) { 10189 10190 netdev_warn(bp->dev, "Device requests max timeout of %d seconds, may trigger hung task watchdog (kernel default %ds)\n", 10190 10191 max_tmo_secs, CONFIG_DEFAULT_HUNG_TASK_TIMEOUT); 10191 10192 } 10193 + #endif 10192 10194 10193 10195 if (resp->hwrm_intf_maj_8b >= 1) { 10194 10196 bp->hwrm_max_req_len = le16_to_cpu(resp->max_req_win_len);