* [PATCH] bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code
@ 2025-04-23 16:28 Arnd Bergmann
2025-04-23 17:28 ` Michael Chan
2025-04-23 22:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2025-04-23 16:28 UTC (permalink / raw)
To: Michael Chan, Pavan Chebbi, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Kalesh AP,
Andy Gospodarek
Cc: Arnd Bergmann, Somnath Kotur, Simon Horman, Taehee Yoo, David Wei,
netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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>
---
I'm not really happy with my version either, but could not come up
with a better approach. This may need a larger rework.
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index ad30445b4799..18359fabe087 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -10184,11 +10184,13 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)
if (!bp->hwrm_cmd_max_timeout)
bp->hwrm_cmd_max_timeout = HWRM_CMD_MAX_TIMEOUT;
max_tmo_secs = bp->hwrm_cmd_max_timeout / 1000;
+#ifdef CONFIG_DETECT_HUNG_TASK
if (bp->hwrm_cmd_max_timeout > HWRM_CMD_MAX_TIMEOUT ||
max_tmo_secs > CONFIG_DEFAULT_HUNG_TASK_TIMEOUT) {
netdev_warn(bp->dev, "Device requests max timeout of %d seconds, may trigger hung task watchdog (kernel default %ds)\n",
max_tmo_secs, CONFIG_DEFAULT_HUNG_TASK_TIMEOUT);
}
+#endif
if (resp->hwrm_intf_maj_8b >= 1) {
bp->hwrm_max_req_len = le16_to_cpu(resp->max_req_win_len);
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code
2025-04-23 16:28 [PATCH] bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code Arnd Bergmann
@ 2025-04-23 17:28 ` Michael Chan
2025-04-23 22:10 ` Jacob Keller
2025-04-23 22:40 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Michael Chan @ 2025-04-23 17:28 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Pavan Chebbi, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Kalesh AP, Andy Gospodarek,
Arnd Bergmann, Somnath Kotur, Simon Horman, Taehee Yoo, David Wei,
netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
On Wed, Apr 23, 2025 at 9:28 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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>
I also cannot think of a better way, so this looks fine to me. Thanks.
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4196 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code
2025-04-23 17:28 ` Michael Chan
@ 2025-04-23 22:10 ` Jacob Keller
0 siblings, 0 replies; 4+ messages in thread
From: Jacob Keller @ 2025-04-23 22:10 UTC (permalink / raw)
To: Michael Chan, Arnd Bergmann
Cc: Pavan Chebbi, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Kalesh AP, Andy Gospodarek,
Arnd Bergmann, Somnath Kotur, Simon Horman, Taehee Yoo, David Wei,
netdev, linux-kernel
On 4/23/2025 10:28 AM, Michael Chan wrote:
> On Wed, Apr 23, 2025 at 9:28 AM Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> 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>
>
> I also cannot think of a better way, so this looks fine to me. Thanks.
> Reviewed-by: Michael Chan <michael.chan@broadcom.com>
I ran into this just now, and this fixed compilation for me.
Tested-by: Jacob Keller <jacob.e.keller@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code
2025-04-23 16:28 [PATCH] bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code Arnd Bergmann
2025-04-23 17:28 ` Michael Chan
@ 2025-04-23 22:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-23 22:40 UTC (permalink / raw)
To: Arnd Bergmann
Cc: michael.chan, pavan.chebbi, andrew+netdev, davem, edumazet, kuba,
pabeni, kalesh-anakkur.purayil, andrew.gospodarek, arnd,
somnath.kotur, horms, ap420073, dw, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 23 Apr 2025 18:28:21 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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) {
>
> [...]
Here is the summary with links:
- bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code
https://git.kernel.org/netdev/net-next/c/8ff617513996
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:[~2025-04-23 22:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 16:28 [PATCH] bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code Arnd Bergmann
2025-04-23 17:28 ` Michael Chan
2025-04-23 22:10 ` Jacob Keller
2025-04-23 22:40 ` 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).