]> 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)
commitf936b5267b0d0dc1f1eeec29c3cc13969cf7e2f4
treedbd2a8f268d8db0cd748b628c3b9eeb33a282f87
parentaa06401b952b555831ba75f470b81a0f18934f59
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