Commit 41d0a4d0 authored by Alan Brady's avatar Alan Brady Committed by Jeff Kirsher

i40e: fix handling of vf_states variable

Currently we inappropriately clear the vf_states variable with a null
assignment.  This is problematic because we should be using atomic
bitops on this variable and we don't actually want to clear all the
flags.  We should just clear the ones we know we want to clear.
Additionally remove the I40E_VF_STATE_FCOEENA bit because it is no
longer being used.
Signed-off-by: default avatarAlan Brady <alan.brady@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 1b7b7596
...@@ -879,7 +879,8 @@ static void i40e_free_vf_res(struct i40e_vf *vf) ...@@ -879,7 +879,8 @@ static void i40e_free_vf_res(struct i40e_vf *vf)
} }
/* reset some of the state variables keeping track of the resources */ /* reset some of the state variables keeping track of the resources */
vf->num_queue_pairs = 0; vf->num_queue_pairs = 0;
vf->vf_states = 0; clear_bit(I40E_VF_STATE_MC_PROMISC, &vf->vf_states);
clear_bit(I40E_VF_STATE_UC_PROMISC, &vf->vf_states);
} }
/** /**
...@@ -1586,6 +1587,8 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg) ...@@ -1586,6 +1587,8 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
(vf->driver_caps & VIRTCHNL_VF_OFFLOAD_IWARP)) { (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_IWARP)) {
vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_IWARP; vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_IWARP;
set_bit(I40E_VF_STATE_IWARPENA, &vf->vf_states); set_bit(I40E_VF_STATE_IWARPENA, &vf->vf_states);
} else {
clear_bit(I40E_VF_STATE_IWARPENA, &vf->vf_states);
} }
if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PF) { if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
......
...@@ -56,7 +56,6 @@ enum i40e_vf_states { ...@@ -56,7 +56,6 @@ enum i40e_vf_states {
I40E_VF_STATE_INIT = 0, I40E_VF_STATE_INIT = 0,
I40E_VF_STATE_ACTIVE, I40E_VF_STATE_ACTIVE,
I40E_VF_STATE_IWARPENA, I40E_VF_STATE_IWARPENA,
I40E_VF_STATE_FCOEENA,
I40E_VF_STATE_DISABLED, I40E_VF_STATE_DISABLED,
I40E_VF_STATE_MC_PROMISC, I40E_VF_STATE_MC_PROMISC,
I40E_VF_STATE_UC_PROMISC, I40E_VF_STATE_UC_PROMISC,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment