net/bnxt: fix firmware fatal error handling
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Wed, 24 Feb 2021 15:55:51 +0000 (21:25 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 12 Mar 2021 06:00:22 +0000 (07:00 +0100)
commit94131e4ab74728da994d5179052bb30c3c76910c
treee65422ccd5c53d0c26183a74178df092fbfb093b
parent705e0f32f62e3ee76ce8cd17c38091d3eb7fb965
net/bnxt: fix firmware fatal error handling

During some fatal firmware error conditions, the PCI config space
register 0x2e which normally contains the subsystem ID will become
0xffff. This register will revert back to the normal value after
the chip has completed core reset. If we detect this condition,
we can poll this config register immediately for the value to revert.
Because we use config read cycles to poll this register, there is no
possibility of Master Abort if we happen to read it during core reset.
This speeds up recovery significantly as we don't have to wait for the
conservative min_time before polling to see if the firmware has come
out of reset. As soon as this register changes value we can proceed
to re-initialize the device.

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: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_util.h