bnx2: Use pci_enable_msix_range() instead of pci_enable_msix()
[deliverable/linux.git] / drivers / net / ethernet / broadcom / bnx2.c
index cda25ac45b475ad7c173a78191f232ea7a252882..ca6b36220d9440d58dda2de90adce6cc2f49a9ed 100644 (file)
@@ -6206,7 +6206,7 @@ bnx2_free_irq(struct bnx2 *bp)
 static void
 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 net_device *dev = bp->dev;
        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
        total_vecs++;
 #endif
-       rc = -ENOSPC;
-       while (total_vecs >= BNX2_MIN_MSIX_VEC) {
-               rc = pci_enable_msix(bp->pdev, msix_ent, total_vecs);
-               if (rc <= 0)
-                       break;
-               if (rc > 0)
-                       total_vecs = rc;
-       }
-
-       if (rc != 0)
+       total_vecs = pci_enable_msix_range(bp->pdev, msix_ent,
+                                          BNX2_MIN_MSIX_VEC, total_vecs);
+       if (total_vecs < 0)
                return;
 
        msix_vecs = total_vecs;
This page took 0.02489 seconds and 5 git commands to generate.