]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Improve wait for firmware commands completion
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Mon, 22 Mar 2021 07:08:40 +0000 (03:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 20:07:28 +0000 (13:07 -0700)
commit99eb781cca6f690d58a1c493f6b62d2bdb19f262
treedbd2a8f268d8db0cd748b628c3b9eeb33a282f87
parente46a45bd48175f79ee4f9e7f031965306db205ad
bnxt_en: Improve wait for firmware commands completion

In situations where FW has crashed, the bnxt_hwrm_do_send_msg() call
will have to wait until timeout for each firmware message.  This
generally takes about half a second for each firmware message.  If we
try to unload the driver n this state, the unload sequence will take
a long time to complete.

Improve this by checking the health register if it is available and
abort the wait for the firmware response if the register shows that
firmware is not healthy.  The very first message HWRM_VER_GET is
excluded from this check because that message is used to poll for
firmware to come out of reset during error recovery.

Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h