bnxt_en: Fix MSIX request logic for RDMA driver.
authorMichael Chan <michael.chan@broadcom.com>
Tue, 10 Dec 2019 07:49:07 +0000 (02:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 18:18:50 +0000 (19:18 +0100)
commit972d2ca72c8cca730e0ce349e935acf7cea48b9a
tree22e7a4c2b749b55cb4501c460d30591bfef5f05e
parentff4839120cbe24c2cbf4339b17771c7140e81720
bnxt_en: Fix MSIX request logic for RDMA driver.

[ Upstream commit 0c722ec0a289c7f6b53f89bad1cfb7c4db3f7a62 ]

The logic needs to check both bp->total_irqs and the reserved IRQs in
hw_resc->resv_irqs if applicable and see if both are enough to cover
the L2 and RDMA requested vectors.  The current code is only checking
bp->total_irqs and can fail in some code paths, such as the TX timeout
code path with the RDMA driver requesting vectors after recovery.  In
this code path, we have not reserved enough MSIX resources for the
RDMA driver yet.

Fixes: 75720e6323a1 ("bnxt_en: Keep track of reserved IRQs.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c