diff options
author | Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> | 2011-06-22 02:52:20 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-24 01:17:07 -0700 |
commit | 5f6ec29abe434676f940357bcd66536bbc69e9f8 (patch) | |
tree | 7fe250eedb31bae643c3706c0268ffddaa1888f1 /drivers/net/qlcnic/qlcnic_main.c | |
parent | c40f4ef77e5123a1d4064d7a34f708483b32b8be (diff) |
qlcnic: fix initial number of msix entries in adapter.
Calculation of number of MSI-X vectors was wrong on uniprocessor
systems.
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index a656a12e24d1..a050746a5129 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -418,10 +418,8 @@ qlcnic_setup_intr(struct qlcnic_adapter *adapter) int num_msix; if (adapter->msix_supported) { - num_msix = (num_online_cpus() >= - QLCNIC_DEF_NUM_STS_DESC_RINGS) ? - QLCNIC_DEF_NUM_STS_DESC_RINGS : - QLCNIC_MIN_NUM_RSS_RINGS; + num_msix = rounddown_pow_of_two(min_t(int, num_online_cpus(), + QLCNIC_DEF_NUM_STS_DESC_RINGS)); } else num_msix = 1; |