diff options
author | Michal Kalderon <michals@broadcom.com> | 2014-01-05 11:33:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-05 20:22:24 -0500 |
commit | 89e18ae6e6288deb1940cd16afe4e6983545defa (patch) | |
tree | 25618f804d4bb43805ee249c1f9c5cf93e3e258c /drivers | |
parent | e848582cee23f7ab540ec49ab1c7d7f8bfefcd84 (diff) |
bnx2x: Correct number of MSI-X vectors for VFs
Number of VFs in PCIe configuration space is zero-based. Driver incorrectly
sets the number of VFs to be larger by one than what actually is feasible by
HW, which might cause later VFs to fail to allocate their MSI-X interrupts.
Signed-off-by: Michal Kalderon <michals@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c index 2e46c28fc601..ddd95b9fa6cf 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | |||
@@ -3202,13 +3202,16 @@ int bnx2x_enable_sriov(struct bnx2x *bp) | |||
3202 | bnx2x_iov_static_resc(bp, vf); | 3202 | bnx2x_iov_static_resc(bp, vf); |
3203 | } | 3203 | } |
3204 | 3204 | ||
3205 | /* prepare msix vectors in VF configuration space */ | 3205 | /* prepare msix vectors in VF configuration space - the value in the |
3206 | * PCI configuration space should be the index of the last entry, | ||
3207 | * namely one less than the actual size of the table | ||
3208 | */ | ||
3206 | for (vf_idx = first_vf; vf_idx < first_vf + req_vfs; vf_idx++) { | 3209 | for (vf_idx = first_vf; vf_idx < first_vf + req_vfs; vf_idx++) { |
3207 | bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf_idx)); | 3210 | bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf_idx)); |
3208 | REG_WR(bp, PCICFG_OFFSET + GRC_CONFIG_REG_VF_MSIX_CONTROL, | 3211 | REG_WR(bp, PCICFG_OFFSET + GRC_CONFIG_REG_VF_MSIX_CONTROL, |
3209 | num_vf_queues); | 3212 | num_vf_queues - 1); |
3210 | DP(BNX2X_MSG_IOV, "set msix vec num in VF %d cfg space to %d\n", | 3213 | DP(BNX2X_MSG_IOV, "set msix vec num in VF %d cfg space to %d\n", |
3211 | vf_idx, num_vf_queues); | 3214 | vf_idx, num_vf_queues - 1); |
3212 | } | 3215 | } |
3213 | bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); | 3216 | bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); |
3214 | 3217 | ||