Skip to content

Commit f682430

Browse files
Vasundhara VolamJakub Kicinski
authored andcommitted
bnxt_en: Avoid disabling pci device in bnxt_remove_one() for already disabled device.
With the recently added error recovery logic, the device may already be disabled if the firmware recovery is unsuccessful. In bnxt_remove_one(), check that the device is still enabled first before calling pci_disable_device(). Fixes: 3bc7d4a ("bnxt_en: Add BNXT_STATE_IN_FW_RESET state.") Signed-off-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f255ed1 commit f682430

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10382,7 +10382,8 @@ static void bnxt_cleanup_pci(struct bnxt *bp)
1038210382
{
1038310383
bnxt_unmap_bars(bp, bp->pdev);
1038410384
pci_release_regions(bp->pdev);
10385-
pci_disable_device(bp->pdev);
10385+
if (pci_is_enabled(bp->pdev))
10386+
pci_disable_device(bp->pdev);
1038610387
}
1038710388

1038810389
static void bnxt_init_dflt_coal(struct bnxt *bp)

0 commit comments

Comments
 (0)