Skip to content

Commit 7474b1c

Browse files
vikasbrcmdavem330
authored andcommitted
bnxt_en: refactor reset close code
Introduce bnxt_fw_fatal_close() API which can be used to stop data path and disable device when firmware is in fatal state. Signed-off-by: Vikas Gupta <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4fd1edc commit 7474b1c

File tree

1 file changed

+11
-6
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+11
-6
lines changed

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13037,6 +13037,16 @@ static void bnxt_rx_ring_reset(struct bnxt *bp)
1303713037
bnxt_rtnl_unlock_sp(bp);
1303813038
}
1303913039

13040+
static void bnxt_fw_fatal_close(struct bnxt *bp)
13041+
{
13042+
bnxt_tx_disable(bp);
13043+
bnxt_disable_napi(bp);
13044+
bnxt_disable_int_sync(bp);
13045+
bnxt_free_irq(bp);
13046+
bnxt_clear_int_mode(bp);
13047+
pci_disable_device(bp->pdev);
13048+
}
13049+
1304013050
static void bnxt_fw_reset_close(struct bnxt *bp)
1304113051
{
1304213052
bnxt_ulp_stop(bp);
@@ -13050,12 +13060,7 @@ static void bnxt_fw_reset_close(struct bnxt *bp)
1305013060
pci_read_config_word(bp->pdev, PCI_SUBSYSTEM_ID, &val);
1305113061
if (val == 0xffff)
1305213062
bp->fw_reset_min_dsecs = 0;
13053-
bnxt_tx_disable(bp);
13054-
bnxt_disable_napi(bp);
13055-
bnxt_disable_int_sync(bp);
13056-
bnxt_free_irq(bp);
13057-
bnxt_clear_int_mode(bp);
13058-
pci_disable_device(bp->pdev);
13063+
bnxt_fw_fatal_close(bp);
1305913064
}
1306013065
__bnxt_close_nic(bp, true, false);
1306113066
bnxt_vf_reps_free(bp);

0 commit comments

Comments
 (0)