diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-09-27 04:25:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-28 01:09:50 -0400 |
commit | 657d92fe6d693b9674264bc7546e664714955425 (patch) | |
tree | 4842bdb3f8f504d0f7b3b37d3da6fce12207d9e3 /drivers/net | |
parent | 3171d026291d08c2a4cfe06302ce308b09605c4b (diff) |
bnx2: Use netif_set_real_num_{rx,tx}_queues()
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 3d1a5da98622..b10be27f340a 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -6202,7 +6202,7 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) | |||
6202 | } | 6202 | } |
6203 | } | 6203 | } |
6204 | 6204 | ||
6205 | static void | 6205 | static int |
6206 | bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi) | 6206 | bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi) |
6207 | { | 6207 | { |
6208 | int cpus = num_online_cpus(); | 6208 | int cpus = num_online_cpus(); |
@@ -6231,9 +6231,10 @@ bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi) | |||
6231 | } | 6231 | } |
6232 | 6232 | ||
6233 | bp->num_tx_rings = rounddown_pow_of_two(bp->irq_nvecs); | 6233 | bp->num_tx_rings = rounddown_pow_of_two(bp->irq_nvecs); |
6234 | bp->dev->real_num_tx_queues = bp->num_tx_rings; | 6234 | netif_set_real_num_tx_queues(bp->dev, bp->num_tx_rings); |
6235 | 6235 | ||
6236 | bp->num_rx_rings = bp->irq_nvecs; | 6236 | bp->num_rx_rings = bp->irq_nvecs; |
6237 | return netif_set_real_num_rx_queues(bp->dev, bp->num_rx_rings); | ||
6237 | } | 6238 | } |
6238 | 6239 | ||
6239 | /* Called with rtnl_lock */ | 6240 | /* Called with rtnl_lock */ |
@@ -6248,7 +6249,9 @@ bnx2_open(struct net_device *dev) | |||
6248 | bnx2_set_power_state(bp, PCI_D0); | 6249 | bnx2_set_power_state(bp, PCI_D0); |
6249 | bnx2_disable_int(bp); | 6250 | bnx2_disable_int(bp); |
6250 | 6251 | ||
6251 | bnx2_setup_int_mode(bp, disable_msi); | 6252 | rc = bnx2_setup_int_mode(bp, disable_msi); |
6253 | if (rc) | ||
6254 | goto open_err; | ||
6252 | bnx2_init_napi(bp); | 6255 | bnx2_init_napi(bp); |
6253 | bnx2_napi_enable(bp); | 6256 | bnx2_napi_enable(bp); |
6254 | rc = bnx2_alloc_mem(bp); | 6257 | rc = bnx2_alloc_mem(bp); |