bnxt_en: Skip firmware fatal error recovery if chip is not accessible
authorVikas Gupta <vikas.gupta@broadcom.com>
Wed, 7 Jun 2023 07:54:07 +0000 (00:54 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 8 Jun 2023 08:52:45 +0000 (10:52 +0200)
commit83474a9b252ab23e6003865c2775024344cb9c09
treec299479703d72bc1fa8de146665e806ce3f48d05
parent1a9e4f501bc6ff1b6ecb60df54fbf2b54db43bfe
bnxt_en: Skip firmware fatal error recovery if chip is not accessible

Driver starts firmware fatal error recovery by detecting
heartbeat failure or fw reset count register changing.  But
these checks are not reliable if the device is not accessible.
This can happen while DPC (Downstream Port containment) is in
progress.  Skip firmware fatal recovery if pci_device_is_present()
returns false.

Fixes: acfb50e4e773 ("bnxt_en: Add FW fatal devlink_health_reporter.")
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c