]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
bnx2: Use netif_set_real_num_{rx,tx}_queues()
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 27 Sep 2010 08:25:16 +0000 (08:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Sep 2010 05:09:50 +0000 (22:09 -0700)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c

index 3d1a5da9862297c7b87f1e5efe3456c991e4bda9..b10be27f340a9dcc353937e7a901245d6edb3f05 100644 (file)
@@ -6202,7 +6202,7 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
        }
 }
 
-static void
+static int
 bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi)
 {
        int cpus = num_online_cpus();
@@ -6231,9 +6231,10 @@ bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi)
        }
 
        bp->num_tx_rings = rounddown_pow_of_two(bp->irq_nvecs);
-       bp->dev->real_num_tx_queues = bp->num_tx_rings;
+       netif_set_real_num_tx_queues(bp->dev, bp->num_tx_rings);
 
        bp->num_rx_rings = bp->irq_nvecs;
+       return netif_set_real_num_rx_queues(bp->dev, bp->num_rx_rings);
 }
 
 /* Called with rtnl_lock */
@@ -6248,7 +6249,9 @@ bnx2_open(struct net_device *dev)
        bnx2_set_power_state(bp, PCI_D0);
        bnx2_disable_int(bp);
 
-       bnx2_setup_int_mode(bp, disable_msi);
+       rc = bnx2_setup_int_mode(bp, disable_msi);
+       if (rc)
+               goto open_err;
        bnx2_init_napi(bp);
        bnx2_napi_enable(bp);
        rc = bnx2_alloc_mem(bp);