]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Enhance retry of the first message to the firmware.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 22 Mar 2021 07:08:45 +0000 (03:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 20:07:28 +0000 (13:07 -0700)
commitc44255eb0b74a11dafe2497c0d7ffefd2dcdfe92
tree88f8df4c4890c66a3f7f2481d734ff203f317eab
parent8f6e8d55a6cefab0ce455630e2fe6be6ca76763c
bnxt_en: Enhance retry of the first message to the firmware.

Two enhancements:

1. Read the health status first before sending the first
HWRM_VER_GET message to firmware instead of the other way around.
This guarantees we got the accurate health status before we attempt
to send the message.

2. We currently only retry sending the first HWRM_VER_GET message to
the firmware if the firmware is in the process of booting.  If the
firmware is in error state and is doing core dump for example, the
driver should also retry if the health register has the RECOVERING
flag set.  This flag indicates the firmware will undergo recovery
soon.  Modify the retry logic to retry for this case as well.

Reviewed-by: Edwin Peer <edwin.peer@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