net/bnxt: fix FW readiness check during recovery
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Wed, 24 Feb 2021 15:55:52 +0000 (21:25 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 12 Mar 2021 06:00:23 +0000 (07:00 +0100)
commit6a4f7139cbce7345e45d9e75d4e28ad1b1218486
tree4eff6373f26ace99f6f5549cb12547e4975a57fa
parent94131e4ab74728da994d5179052bb30c3c76910c
net/bnxt: fix FW readiness check during recovery

Moved fw readiness check to a new routine bnxt_check_fw_ready().

During error recovery, driver needs to wait for fw readiness.
For that, it uses bnxt_hwrm_ver_get() function now and that
function does parsing of the VER_GET response as well.

Added a new lightweight function bnxt_hwrm_poll_ver_get() for polling
the firmware readiness which issues VER_GET and checks for success
without processing the command response.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h