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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2023 09:15:23 +0000 (11:15 +0200)
commit5ce24936d560f226899e3dbf01987668b39fac09
treeab363a708ffa63f3157f13eb82f8c21d5e128ce4
parent5fc86a4580da7314dd8451f630021b9626db8c9d
bnxt_en: Skip firmware fatal error recovery if chip is not accessible

[ Upstream commit 83474a9b252ab23e6003865c2775024344cb9c09 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c