Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2a2dfeb authored by Alexander Gordeev's avatar Alexander Gordeev Committed by David S. Miller
Browse files

bnx2: Use pci_enable_msix_range() instead of pci_enable_msix()



As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.

Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81206ebc
Loading
Loading
Loading
Loading
+4 −11
Original line number Original line Diff line number Diff line
@@ -6206,7 +6206,7 @@ bnx2_free_irq(struct bnx2 *bp)
static void
static void
bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
{
{
	int i, total_vecs, rc;
	int i, total_vecs;
	struct msix_entry msix_ent[BNX2_MAX_MSIX_VEC];
	struct msix_entry msix_ent[BNX2_MAX_MSIX_VEC];
	struct net_device *dev = bp->dev;
	struct net_device *dev = bp->dev;
	const int len = sizeof(bp->irq_tbl[0].name);
	const int len = sizeof(bp->irq_tbl[0].name);
@@ -6229,16 +6229,9 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
#ifdef BCM_CNIC
#ifdef BCM_CNIC
	total_vecs++;
	total_vecs++;
#endif
#endif
	rc = -ENOSPC;
	total_vecs = pci_enable_msix_range(bp->pdev, msix_ent,
	while (total_vecs >= BNX2_MIN_MSIX_VEC) {
					   BNX2_MIN_MSIX_VEC, total_vecs);
		rc = pci_enable_msix(bp->pdev, msix_ent, total_vecs);
	if (total_vecs < 0)
		if (rc <= 0)
			break;
		if (rc > 0)
			total_vecs = rc;
	}

	if (rc != 0)
		return;
		return;


	msix_vecs = total_vecs;
	msix_vecs = total_vecs;