Skip to content

Commit 1ae04e4

Browse files
kadesai16davem330
authored andcommitted
bnxt_en: call pci_alloc_irq_vectors() after bnxt_reserve_rings()
On some architectures (e.g. ARM), calling pci_alloc_irq_vectors() will immediately cause the MSIX table to be written. This will not work if we haven't called bnxt_reserve_rings() to properly map the MSIX table to the MSIX vectors reserved by FW. Fix the FW error recovery path to delay the bnxt_init_int_mode() -> pci_alloc_irq_vectors() call by removing it from bnxt_hwrm_if_change(). bnxt_request_irq() later in the code path will call it and by then the MSIX table is properly mapped. Fixes: 4343838 ("bnxt_en: Replace deprecated PCI MSIX APIs") Suggested-by: Michael Chan <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a63db07 commit 1ae04e4

File tree

1 file changed

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

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12399,13 +12399,8 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
1239912399
set_bit(BNXT_STATE_ABORT_ERR, &bp->state);
1240012400
return rc;
1240112401
}
12402+
/* IRQ will be initialized later in bnxt_request_irq()*/
1240212403
bnxt_clear_int_mode(bp);
12403-
rc = bnxt_init_int_mode(bp);
12404-
if (rc) {
12405-
clear_bit(BNXT_STATE_FW_RESET_DET, &bp->state);
12406-
netdev_err(bp->dev, "init int mode failed\n");
12407-
return rc;
12408-
}
1240912404
}
1241012405
rc = bnxt_cancel_reservations(bp, fw_reset);
1241112406
}

0 commit comments

Comments
 (0)