summaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/en_main.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-30 17:39:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-30 17:39:37 -0800
commit5ed1836814d908f45cafde0e79cb85314ab9d41d (patch)
tree53db7ccf23c78d105b63adf4ee40a07068f0f856 /drivers/net/mlx4/en_main.c
parentab70537c32a3245325b48774664da588904e47f2 (diff)
parenteb4dea5853046727bfbb579f0c9a8cae7369f7c6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: net: Fix percpu counters deadlock cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits: net drivers/net/usb: use USB API functions rather than constants cls_cgroup: clean up Kconfig cls_cgroup: clean up for cgroup part cls_cgroup: fix an oops when removing a cgroup EtherExpress16: fix printing timed out status mlx4_en: Added "set_ringparam" Ethtool interface implementation mlx4_en: Always allocate RX ring for each interrupt vector mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGS IPVS: Make "no destination available" message more consistent between schedulers net: KS8695: removed duplicated #include tun: Fix SIOCSIFHWADDR error. smsc911x: compile fix re netif_rx signature changes netns: foreach_netdev_safe is insufficient in default_device_exit net: make xfrm_statistics_seq_show use generic snmp_fold_field net: Fix more NAPI interface netdev argument drop fallout. net: Fix unused variable warnings in pasemi_mac.c and spider_net.c
Diffstat (limited to 'drivers/net/mlx4/en_main.c')
-rw-r--r--drivers/net/mlx4/en_main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c
index c1c05852a95..eda72dd2120 100644
--- a/drivers/net/mlx4/en_main.c
+++ b/drivers/net/mlx4/en_main.c
@@ -169,13 +169,10 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) {
mlx4_info(mdev, "Using %d tx rings for port:%d\n",
mdev->profile.prof[i].tx_ring_num, i);
- if (!mdev->profile.prof[i].rx_ring_num) {
- mdev->profile.prof[i].rx_ring_num = dev->caps.num_comp_vectors;
- mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n",
- mdev->profile.prof[i].rx_ring_num, i);
- } else
- mlx4_info(mdev, "Using %d rx rings for port:%d\n",
- mdev->profile.prof[i].rx_ring_num, i);
+ mdev->profile.prof[i].rx_ring_num =
+ min_t(int, dev->caps.num_comp_vectors, MAX_RX_RINGS);
+ mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n",
+ mdev->profile.prof[i].rx_ring_num, i);
}
/* Create our own workqueue for reset/multicast tasks