netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shahed Shaikh <shahed.shaikh@qlogic.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <Dept_NX_Linux_NIC_Driver@qlogic.com>,
	Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Subject: [PATCH net-next 2/8] qlcnic: Enable VF flood bit on PF.
Date: Fri, 10 Jan 2014 11:48:53 -0500	[thread overview]
Message-ID: <1389372539-13753-3-git-send-email-shahed.shaikh@qlogic.com> (raw)
In-Reply-To: <1389372539-13753-1-git-send-email-shahed.shaikh@qlogic.com>

From: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>

o On enabling VF flood bit, PF driver will  be able to receive traffic
  from all its VFs.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c   | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
index c588286..09acf15 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
@@ -15,6 +15,8 @@
 #define QLC_MAC_OPCODE_MASK	0x7
 #define QLC_MAC_STAR_ADD	6
 #define QLC_MAC_STAR_DEL	7
+#define QLC_VF_FLOOD_BIT	BIT_16
+#define QLC_FLOOD_MODE		0x5
 
 static int qlcnic_sriov_pf_get_vport_handle(struct qlcnic_adapter *, u8);
 
@@ -347,6 +349,28 @@ static int qlcnic_sriov_pf_cfg_vlan_filtering(struct qlcnic_adapter *adapter,
 	return err;
 }
 
+/* On configuring VF flood bit, PFD will receive traffic from all VFs */
+static int qlcnic_sriov_pf_cfg_flood(struct qlcnic_adapter *adapter)
+{
+	struct qlcnic_cmd_args cmd;
+	int err;
+
+	err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_SET_NIC_INFO);
+	if (err)
+		return err;
+
+	cmd.req.arg[1] = QLC_FLOOD_MODE | QLC_VF_FLOOD_BIT;
+
+	err = qlcnic_issue_cmd(adapter, &cmd);
+	if (err)
+		dev_err(&adapter->pdev->dev,
+			"Failed to configure VF Flood bit on PF, err=%d\n",
+			err);
+
+	qlcnic_free_mbx_args(&cmd);
+	return err;
+}
+
 static int qlcnic_sriov_pf_cfg_eswitch(struct qlcnic_adapter *adapter,
 				       u8 func, u8 enable)
 {
@@ -474,6 +498,12 @@ static int qlcnic_sriov_pf_init(struct qlcnic_adapter *adapter)
 	if (err)
 		return err;
 
+	if (qlcnic_84xx_check(adapter)) {
+		err = qlcnic_sriov_pf_cfg_flood(adapter);
+		if (err)
+			goto disable_vlan_filtering;
+	}
+
 	err = qlcnic_sriov_pf_cfg_eswitch(adapter, func, 1);
 	if (err)
 		goto disable_vlan_filtering;
-- 
1.8.3.1

  parent reply	other threads:[~2014-01-10 17:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 16:48 [PATCH net-next 0/8] qlcnic driver updates Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 1/8] qlcnic: Restrict VF from configuring any VLAN mode Shahed Shaikh
2014-01-10 16:48 ` Shahed Shaikh [this message]
2014-01-10 16:48 ` [PATCH net-next 3/8] qlcnic: Turn on promiscous mode for SRIOV PF Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 4/8] qlcnic: Do MAC learning " Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 5/8] qlcnic: Enable beaconing for 83xx/84xx Series adapter Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 6/8] qlcnic: Fix SR-IOV cleanup code path Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 7/8] qlcnic: Enable IPv6 LRO even if IP address is not programmed Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 8/8] qlcnic: Update version to 5.3.54 Shahed Shaikh
2014-01-13 23:32 ` [PATCH net-next 0/8] qlcnic driver updates David Miller
2014-01-14  5:25   ` Shahed Shaikh

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=1389372539-13753-3-git-send-email-shahed.shaikh@qlogic.com \
    --to=shahed.shaikh@qlogic.com \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sucheta.chakraborty@qlogic.com \
    /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).