bnxt_en: use firmware provided max timeout for messages
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 9 Jan 2022 23:54:44 +0000 (18:54 -0500)
committerJakub Kicinski <kuba@kernel.org>
Mon, 10 Jan 2022 00:27:23 +0000 (16:27 -0800)
commitbce9a0b7900836df223ab638090df0cb8430d9e8
tree4f105d1c8c9ebb71d090c9cbcdd6de2ebe9ec1f5
parent662c9b22f5b568fe79e69b06f3c926cad965bfd2
bnxt_en: use firmware provided max timeout for messages

Some older devices cannot accommodate the 40 seconds timeout
cap for long running commands (such as NVRAM commands) due to
hardware limitations. Allow these devices to request more time for
these long running commands, but print a warning, since the longer
timeout may cause the hung task watchdog to trigger. In the case of a
firmware update operation, this is preferable to failing outright.

v2: Use bp->hwrm_cmd_max_timeout directly without the constants.

Fixes: 881d8353b05e ("bnxt_en: Add an upper bound for all firmware command timeouts.")
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.h