]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: delay pci_alloc_irq_vectors() in the AER path
authorKashyap Desai <kashyap.desai@broadcom.com>
Mon, 28 Apr 2025 22:59:00 +0000 (15:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Apr 2025 12:03:21 +0000 (13:03 +0100)
commitc2d20a3814d1b57dea6db82229edd702bde9c878
tree61ac8c9d2073e6b2ee338463597ceb8995ee4690
parent1ae04e489dd757e1e61999362f33e7c554c3b9e3
bnxt_en: delay pci_alloc_irq_vectors() in the AER path

This patch is similar to the last patch to delay the
pci_alloc_irq_vectors() call in the AER path until after calling
bnxt_reserve_rings().  bnxt_reserve_rings() needs to properly map
the MSIX table first before we call pci_alloc_irq_vectors() which
may immediately write to the MSIX table in some architectures.

Move the bnxt_init_int_mode() call from bnxt_io_slot_reset() to
bnxt_io_resume() after calling bnxt_reserve_rings().

With this change, the AER path may call bnxt_open() ->
bnxt_hwrm_if_change() with bp->irq_tbl set to NULL.  bp->irq_tbl is
cleared when we call bnxt_clear_int_mode() in bnxt_io_slot_reset().
So we cannot use !bp->irq_tbl to detect aborted FW reset.  Add a
new BNXT_FW_RESET_STATE_ABORT to detect aborted FW reset in
bnxt_hwrm_if_change().

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h