public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Neerav Parikh <neerav.parikh@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next v2 08/16] i40e: Use #define for the VSI connection type
Date: Mon, 23 Feb 2015 18:11:13 -0800	[thread overview]
Message-ID: <1424743881-30485-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1424743881-30485-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Neerav Parikh <neerav.parikh@intel.com>

Use #defined VSI connection type values instead of using magic numbers.

Change-ID: I2f6cf7bf394d391e1c0fe61779e9e4ad8858154a
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index 27c206e..8b5bf16 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -381,7 +381,7 @@ int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt)
 	ctxt->pf_num = hw->pf_id;
 	ctxt->vf_num = 0;
 	ctxt->uplink_seid = vsi->uplink_seid;
-	ctxt->connection_type = 0x1;
+	ctxt->connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
 	ctxt->flags = I40E_AQ_VSI_TYPE_PF;
 
 	/* FCoE VSI would need the following sections */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 10ad1ee..e3597cb 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7863,7 +7863,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
 		ctxt.pf_num = hw->pf_id;
 		ctxt.vf_num = 0;
 		ctxt.uplink_seid = vsi->uplink_seid;
-		ctxt.connection_type = 0x1;     /* regular data port */
+		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
 		ctxt.flags = I40E_AQ_VSI_TYPE_PF;
 		ctxt.info.valid_sections |=
 				cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
@@ -7876,7 +7876,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
 		ctxt.pf_num = hw->pf_id;
 		ctxt.vf_num = 0;
 		ctxt.uplink_seid = vsi->uplink_seid;
-		ctxt.connection_type = 0x1;     /* regular data port */
+		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
 		ctxt.flags = I40E_AQ_VSI_TYPE_VMDQ2;
 
 		ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
@@ -7895,7 +7895,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
 		ctxt.pf_num = hw->pf_id;
 		ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id;
 		ctxt.uplink_seid = vsi->uplink_seid;
-		ctxt.connection_type = 0x1;     /* regular data port */
+		ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
 		ctxt.flags = I40E_AQ_VSI_TYPE_VF;
 
 		ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
-- 
1.9.3

  parent reply	other threads:[~2015-02-24  2:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24  2:11 [net-next v2 00/16][pull request] Intel Wired LAN Driver Updates 2015-02-23 Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 01/16] e1000e: initial support for i219 Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 02/16] igbvf: Fix code comments and whitespace Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 03/16] igbvf: cleanup msleep() and min/max() usage Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 04/16] i40e: update Shadow RAM read/write functions Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 05/16] i40e: rename debugfs clear_stats option Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 06/16] i40e/i40evf: Refactor the receive routines Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 07/16] i40e/i40evf: restrict VC opcodes to their initial values Jeff Kirsher
2015-02-24  2:11 ` Jeff Kirsher [this message]
2015-02-24  2:11 ` [net-next v2 09/16] i40e/i40evf: i40e_register.h updates Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 10/16] i40e: Fix the EMPR interrupt received handling Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 11/16] i40e/i40evf: Remove unused variable an_enable and function update_link_info Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 12/16] i40e/i40evf: Bump Driver Versions Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 13/16] i40e: Fix i40e_ndo_set_vf_spoofchk Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 14/16] i40evf: disable NAPI polling sooner Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 15/16] i40evf: refactor reset Jeff Kirsher
2015-02-24  2:11 ` [net-next v2 16/16] i40evf: don't wait forever Jeff Kirsher
2015-02-24  2:58 ` [net-next v2 00/16][pull request] Intel Wired LAN Driver Updates 2015-02-23 David Miller
2015-02-24  6:50   ` Jeff Kirsher
2015-02-24 16:49     ` 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=1424743881-30485-9-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=neerav.parikh@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.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