bnxt_en: Add an upper bound for all firmware command timeouts.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 25 Jan 2021 07:08:12 +0000 (02:08 -0500)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 Jan 2021 03:20:03 +0000 (19:20 -0800)
commit881d8353b05e80d93db14b860581ceba14116422
tree8b41fbd3f3f4bc30db31e8e8436d96e83fdea175
parent3e3c09b0e999f51d35875c3103c6ccb49290788f
bnxt_en: Add an upper bound for all firmware command timeouts.

The timeout period for firmware messages is passed to the driver
from the firmware in the response of the first command.  This
timeout period is multiplied by a factor for certain long
running commands such as NVRAM commands.  In some cases, the
timeout period can become really long and it can cause hung task
warnings if firmware has crashed or is not responding.  To avoid
such long delays, cap all firmware commands to a max timeout value
of 40 seconds.

Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h