Skip to content

Commit 83474a9

Browse files
vikasbrcmPaolo Abeni
authored andcommitted
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: acfb50e ("bnxt_en: Add FW fatal devlink_health_reporter.") Reviewed-by: Somnath Kotur <[email protected]> Reviewed-by: Pavan Chebbi <[email protected]> Signed-off-by: Vikas Gupta <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 1a9e4f5 commit 83474a9

File tree

1 file changed

+3
-2
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+3
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11602,6 +11602,7 @@ static void bnxt_tx_timeout(struct net_device *dev, unsigned int txqueue)
1160211602
static void bnxt_fw_health_check(struct bnxt *bp)
1160311603
{
1160411604
struct bnxt_fw_health *fw_health = bp->fw_health;
11605+
struct pci_dev *pdev = bp->pdev;
1160511606
u32 val;
1160611607

1160711608
if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
@@ -11615,15 +11616,15 @@ static void bnxt_fw_health_check(struct bnxt *bp)
1161511616
}
1161611617

1161711618
val = bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG);
11618-
if (val == fw_health->last_fw_heartbeat) {
11619+
if (val == fw_health->last_fw_heartbeat && pci_device_is_present(pdev)) {
1161911620
fw_health->arrests++;
1162011621
goto fw_reset;
1162111622
}
1162211623

1162311624
fw_health->last_fw_heartbeat = val;
1162411625

1162511626
val = bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
11626-
if (val != fw_health->last_fw_reset_cnt) {
11627+
if (val != fw_health->last_fw_reset_cnt && pci_device_is_present(pdev)) {
1162711628
fw_health->discoveries++;
1162811629
goto fw_reset;
1162911630
}

0 commit comments

Comments
 (0)