From: Mitch Williams Date: Thu, 28 Nov 2013 06:39:36 +0000 (+0000) Subject: i40e: avoid unnecessary register read X-Git-Tag: next-20140107~61^2~13^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b141d6196c748796993890f461dd83c9657ee616;p=karo-tx-linux.git 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 Signed-off-by: Jesse Brandeburg Tested-by: Sibai Li Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 2c042a264db0..bed60220e692 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -600,8 +600,7 @@ static int i40e_quiesce_vf_pci(struct i40e_vf *vf) int vf_abs_id, i; u32 reg; - reg = rd32(hw, I40E_PF_VT_PFALLOC); - vf_abs_id = vf->vf_id + (reg & I40E_PF_VT_PFALLOC_FIRSTVF_MASK); + vf_abs_id = vf->vf_id + hw->func_caps.vf_base_id; wr32(hw, I40E_PF_PCI_CIAA, VF_DEVICE_STATUS | (vf_abs_id << I40E_PF_PCI_CIAA_VF_NUM_SHIFT));