ice: Add function to set trust mode bit on reset
As the title says, use a function to set trust mode bit on reset. Signed-off-by: Brett Creeley <brett.creeley@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
committed by
Jeff Kirsher
parent
a06325a090
commit
eb2af3ee94
@@ -610,6 +610,18 @@ ice_alloc_vsi_res_exit:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ice_vf_set_host_trust_cfg - set trust setting based on pre-reset value
|
||||||
|
* @vf: VF to configure trust setting for
|
||||||
|
*/
|
||||||
|
static void ice_vf_set_host_trust_cfg(struct ice_vf *vf)
|
||||||
|
{
|
||||||
|
if (vf->trusted)
|
||||||
|
set_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
|
||||||
|
else
|
||||||
|
clear_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ice_alloc_vf_res - Allocate VF resources
|
* ice_alloc_vf_res - Allocate VF resources
|
||||||
* @vf: pointer to the VF structure
|
* @vf: pointer to the VF structure
|
||||||
@@ -635,10 +647,7 @@ static int ice_alloc_vf_res(struct ice_vf *vf)
|
|||||||
if (status)
|
if (status)
|
||||||
goto ice_alloc_vf_res_exit;
|
goto ice_alloc_vf_res_exit;
|
||||||
|
|
||||||
if (vf->trusted)
|
ice_vf_set_host_trust_cfg(vf);
|
||||||
set_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
|
|
||||||
else
|
|
||||||
clear_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
|
|
||||||
|
|
||||||
/* VF is now completely initialized */
|
/* VF is now completely initialized */
|
||||||
set_bit(ICE_VF_STATE_INIT, vf->vf_states);
|
set_bit(ICE_VF_STATE_INIT, vf->vf_states);
|
||||||
|
|||||||
Reference in New Issue
Block a user