diff options
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 21022801a789..ae7548a5286e 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | |||
@@ -703,6 +703,7 @@ static void i40e_free_vf_res(struct i40e_vf *vf) | |||
703 | */ | 703 | */ |
704 | vf->num_queue_pairs = 0; | 704 | vf->num_queue_pairs = 0; |
705 | vf->vf_states = 0; | 705 | vf->vf_states = 0; |
706 | clear_bit(I40E_VF_STAT_INIT, &vf->vf_states); | ||
706 | } | 707 | } |
707 | 708 | ||
708 | /** | 709 | /** |
@@ -841,11 +842,11 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr) | |||
841 | complete_reset: | 842 | complete_reset: |
842 | /* reallocate VF resources to reset the VSI state */ | 843 | /* reallocate VF resources to reset the VSI state */ |
843 | i40e_free_vf_res(vf); | 844 | i40e_free_vf_res(vf); |
844 | i40e_alloc_vf_res(vf); | 845 | if (!i40e_alloc_vf_res(vf)) { |
845 | i40e_enable_vf_mappings(vf); | 846 | i40e_enable_vf_mappings(vf); |
846 | set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states); | 847 | set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states); |
847 | clear_bit(I40E_VF_STAT_DISABLED, &vf->vf_states); | 848 | clear_bit(I40E_VF_STAT_DISABLED, &vf->vf_states); |
848 | 849 | } | |
849 | /* tell the VF the reset is done */ | 850 | /* tell the VF the reset is done */ |
850 | wr32(hw, I40E_VFGEN_RSTAT1(vf->vf_id), I40E_VFR_VFACTIVE); | 851 | wr32(hw, I40E_VFGEN_RSTAT1(vf->vf_id), I40E_VFR_VFACTIVE); |
851 | i40e_flush(hw); | 852 | i40e_flush(hw); |