i40e: avoid unnecessary register read
We don't need to read the base VF id. It's already stashed in the HW struct. Change-Id: Ib81e2f76fc40b12c966e014a856b481912cafefc Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>hifive-unleashed-5.1
parent
1b60f3c416
commit
b141d6196c
|
@ -600,8 +600,7 @@ static int i40e_quiesce_vf_pci(struct i40e_vf *vf)
|
||||||
int vf_abs_id, i;
|
int vf_abs_id, i;
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
reg = rd32(hw, I40E_PF_VT_PFALLOC);
|
vf_abs_id = vf->vf_id + hw->func_caps.vf_base_id;
|
||||||
vf_abs_id = vf->vf_id + (reg & I40E_PF_VT_PFALLOC_FIRSTVF_MASK);
|
|
||||||
|
|
||||||
wr32(hw, I40E_PF_PCI_CIAA,
|
wr32(hw, I40E_PF_PCI_CIAA,
|
||||||
VF_DEVICE_STATUS | (vf_abs_id << I40E_PF_PCI_CIAA_VF_NUM_SHIFT));
|
VF_DEVICE_STATUS | (vf_abs_id << I40E_PF_PCI_CIAA_VF_NUM_SHIFT));
|
||||||
|
|
Loading…
Reference in New Issue