From: Yuval Mintz <yuvalmin@broadcom.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <ariele@broadcom.com>, Michal Kalderon <michals@broadcom.com>,
Yuval Mintz <yuvalmin@broadcom.com>
Subject: [PATCH net 2/5] bnx2x: Correct number of MSI-X vectors for VFs
Date: Sun, 5 Jan 2014 18:33:51 +0200 [thread overview]
Message-ID: <1388939634-19948-3-git-send-email-yuvalmin@broadcom.com> (raw)
In-Reply-To: <1388939634-19948-1-git-send-email-yuvalmin@broadcom.com>
From: Michal Kalderon <michals@broadcom.com>
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>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 9 ++++++---
1 file 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 2e46c28..ddd95b9 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)
bnx2x_iov_static_resc(bp, vf);
}
- /* prepare msix vectors in VF configuration space */
+ /* prepare msix vectors in VF configuration space - the value in the
+ * PCI configuration space should be the index of the last entry,
+ * namely one less than the actual size of the table
+ */
for (vf_idx = first_vf; vf_idx < first_vf + req_vfs; vf_idx++) {
bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf_idx));
REG_WR(bp, PCICFG_OFFSET + GRC_CONFIG_REG_VF_MSIX_CONTROL,
- num_vf_queues);
+ num_vf_queues - 1);
DP(BNX2X_MSG_IOV, "set msix vec num in VF %d cfg space to %d\n",
- vf_idx, num_vf_queues);
+ vf_idx, num_vf_queues - 1);
}
bnx2x_pretend_func(bp, BP_ABS_FUNC(bp));
--
1.8.1.227.g44fe835
next prev parent reply other threads:[~2014-01-05 16:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-05 16:33 [PATCH net 0/5] bnx2x: Bug fixes patch series Yuval Mintz
2014-01-05 16:33 ` [PATCH net 1/5] bnx2x: limit number of interrupt vectors for 57711 Yuval Mintz
2014-01-06 13:47 ` Sergei Shtylyov
2014-01-05 16:33 ` Yuval Mintz [this message]
2014-01-06 16:28 ` [BUG] bnx2x : lockdep assertion Eric Dumazet
2014-01-06 16:35 ` Ariel Elior
2014-01-06 16:49 ` Eric Dumazet
2014-01-05 16:33 ` [PATCH net 3/5] bnx2x: Clean before update RSS arrives Yuval Mintz
2014-01-05 16:33 ` [PATCH net 4/5] bnx2x: fix AFEX memory overflow Yuval Mintz
2014-01-05 16:33 ` [PATCH net 5/5] bnx2x: fix VLAN configuration for VFs Yuval Mintz
2014-01-05 19:19 ` Or Gerlitz
2014-01-05 19:24 ` Yuval Mintz
2014-01-06 1:23 ` [PATCH net 0/5] bnx2x: Bug fixes patch series David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388939634-19948-3-git-send-email-yuvalmin@broadcom.com \
--to=yuvalmin@broadcom.com \
--cc=ariele@broadcom.com \
--cc=davem@davemloft.net \
--cc=michals@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).