bnxt_en: Fix possible BUG() condition when calling pci_disable_msix().
authorMichael Chan <michael.chan@broadcom.com>
Wed, 22 May 2019 23:12:55 +0000 (19:12 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 May 2019 01:02:14 +0000 (18:02 -0700)
commit1b3f0b75c39f534278a895c117282014e9d0ae1f
tree2d8e8f458df5991691dbe8ca5c1fe1ceffbdbcf4
parent296d5b54163964b7ae536b8b57dfbd21d4e868e1
bnxt_en: Fix possible BUG() condition when calling pci_disable_msix().

When making configuration changes, the driver calls bnxt_close_nic()
and then bnxt_open_nic() for the changes to take effect.  A parameter
irq_re_init is passed to the call sequence to indicate if IRQ
should be re-initialized.  This irq_re_init parameter needs to
be included in the bnxt_reserve_rings() call.  bnxt_reserve_rings()
can only call pci_disable_msix() if the irq_re_init parameter is
true, otherwise it may hit BUG() because some IRQs may not have been
freed yet.

Fixes: 41e8d7983752 ("bnxt_en: Modify the ring reservation functions for 57500 series chips.")
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
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c