diff options
author | Neerav Parikh <neerav.parikh@intel.com> | 2015-01-24 04:58:38 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-02-23 20:11:57 -0500 |
commit | 2b18e5914d5210b47782a6ef724f2257662fc4da (patch) | |
tree | 7a0eeb1f41e796d7ae373b251ffbc920e5ef6ad5 /drivers/net/ethernet | |
parent | 396642a6794bd7dc77271e5e5180de09ac3e1d33 (diff) |
i40e: Use #define for the VSI connection type
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 2 | ||||
-rw-r--r-- | 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 27c206e62da7..8b5bf16d3270 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) | |||
381 | ctxt->pf_num = hw->pf_id; | 381 | ctxt->pf_num = hw->pf_id; |
382 | ctxt->vf_num = 0; | 382 | ctxt->vf_num = 0; |
383 | ctxt->uplink_seid = vsi->uplink_seid; | 383 | ctxt->uplink_seid = vsi->uplink_seid; |
384 | ctxt->connection_type = 0x1; | 384 | ctxt->connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL; |
385 | ctxt->flags = I40E_AQ_VSI_TYPE_PF; | 385 | ctxt->flags = I40E_AQ_VSI_TYPE_PF; |
386 | 386 | ||
387 | /* FCoE VSI would need the following sections */ | 387 | /* 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 10ad1eec21f5..e3597cb36e30 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) | |||
7863 | ctxt.pf_num = hw->pf_id; | 7863 | ctxt.pf_num = hw->pf_id; |
7864 | ctxt.vf_num = 0; | 7864 | ctxt.vf_num = 0; |
7865 | ctxt.uplink_seid = vsi->uplink_seid; | 7865 | ctxt.uplink_seid = vsi->uplink_seid; |
7866 | ctxt.connection_type = 0x1; /* regular data port */ | 7866 | ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL; |
7867 | ctxt.flags = I40E_AQ_VSI_TYPE_PF; | 7867 | ctxt.flags = I40E_AQ_VSI_TYPE_PF; |
7868 | ctxt.info.valid_sections |= | 7868 | ctxt.info.valid_sections |= |
7869 | cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID); | 7869 | cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID); |
@@ -7876,7 +7876,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) | |||
7876 | ctxt.pf_num = hw->pf_id; | 7876 | ctxt.pf_num = hw->pf_id; |
7877 | ctxt.vf_num = 0; | 7877 | ctxt.vf_num = 0; |
7878 | ctxt.uplink_seid = vsi->uplink_seid; | 7878 | ctxt.uplink_seid = vsi->uplink_seid; |
7879 | ctxt.connection_type = 0x1; /* regular data port */ | 7879 | ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL; |
7880 | ctxt.flags = I40E_AQ_VSI_TYPE_VMDQ2; | 7880 | ctxt.flags = I40E_AQ_VSI_TYPE_VMDQ2; |
7881 | 7881 | ||
7882 | ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID); | 7882 | 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) | |||
7895 | ctxt.pf_num = hw->pf_id; | 7895 | ctxt.pf_num = hw->pf_id; |
7896 | ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id; | 7896 | ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id; |
7897 | ctxt.uplink_seid = vsi->uplink_seid; | 7897 | ctxt.uplink_seid = vsi->uplink_seid; |
7898 | ctxt.connection_type = 0x1; /* regular data port */ | 7898 | ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL; |
7899 | ctxt.flags = I40E_AQ_VSI_TYPE_VF; | 7899 | ctxt.flags = I40E_AQ_VSI_TYPE_VF; |
7900 | 7900 | ||
7901 | ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID); | 7901 | ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID); |