bnxt_en: Disable MSIX before re-reserving NQs/CMPL rings.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 16 Dec 2018 23:46:24 +0000 (18:46 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:47:11 +0000 (19:47 +0100)
commit4cd197bfa6e1ae3c49f4b21afa33195175f788ec
tree7274ab2065693135d9396b4c76d2c6692b73eb04
parentae93f5f803ae0fa08ad95dd5d1c88de59a17e033
bnxt_en: Disable MSIX before re-reserving NQs/CMPL rings.

[ Upstream commit 36d65be9a88052cdfc8524eb591baf0e6c878408 ]

When bringing up a device, the code checks to see if the number of
MSIX has changed.  pci_disable_msix() should be called first before
changing the number of reserved NQs/CMPL rings.  This ensures that
the MSIX vectors associated with the NQs/CMPL rings are still
properly mapped when pci_disable_msix() masks the vectors.

This patch will prevent errors when RDMA support is added for the new
57500 chips.  When the RDMA driver shuts down, the number of NQs is
decreased and we must use the new sequence to prevent MSIX errors.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c