Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f6ec29a authored by Sucheta Chakraborty's avatar Sucheta Chakraborty Committed by David S. Miller
Browse files

qlcnic: fix initial number of msix entries in adapter.



Calculation of number of MSI-X vectors was wrong on uniprocessor
systems.

Signed-off-by: default avatarSucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: default avatarAnirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c40f4ef7
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -900,7 +900,6 @@ struct qlcnic_ipaddr {
	((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))

#define QLCNIC_DEF_NUM_STS_DESC_RINGS	4
#define QLCNIC_MIN_NUM_RSS_RINGS	2
#define QLCNIC_MSIX_TBL_SPACE		8192
#define QLCNIC_PCI_REG_MSIX_TBL 	0x44
#define QLCNIC_MSIX_TBL_PGSIZE		4096
+2 −4
Original line number Diff line number Diff line
@@ -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;