Commit 13fd9774 authored by Shannon Nelson's avatar Shannon Nelson Committed by Jeff Kirsher

i40e: use pf_id for pf function id in qtx_ctl

Simplify code by using an already existing variable.
Signed-off-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 59072ba1
...@@ -2174,8 +2174,8 @@ static int i40e_configure_tx_ring(struct i40e_ring *ring) ...@@ -2174,8 +2174,8 @@ static int i40e_configure_tx_ring(struct i40e_ring *ring)
/* Now associate this queue with this PCI function */ /* Now associate this queue with this PCI function */
qtx_ctl = I40E_QTX_CTL_PF_QUEUE; qtx_ctl = I40E_QTX_CTL_PF_QUEUE;
qtx_ctl |= ((hw->hmc.hmc_fn_id << I40E_QTX_CTL_PF_INDX_SHIFT) qtx_ctl |= ((hw->pf_id << I40E_QTX_CTL_PF_INDX_SHIFT) &
& I40E_QTX_CTL_PF_INDX_MASK); I40E_QTX_CTL_PF_INDX_MASK);
wr32(hw, I40E_QTX_CTL(pf_q), qtx_ctl); wr32(hw, I40E_QTX_CTL(pf_q), qtx_ctl);
i40e_flush(hw); i40e_flush(hw);
......
...@@ -383,7 +383,7 @@ static int i40e_config_vsi_tx_queue(struct i40e_vf *vf, u16 vsi_idx, ...@@ -383,7 +383,7 @@ static int i40e_config_vsi_tx_queue(struct i40e_vf *vf, u16 vsi_idx,
/* associate this queue with the PCI VF function */ /* associate this queue with the PCI VF function */
qtx_ctl = I40E_QTX_CTL_VF_QUEUE; qtx_ctl = I40E_QTX_CTL_VF_QUEUE;
qtx_ctl |= ((hw->hmc.hmc_fn_id << I40E_QTX_CTL_PF_INDX_SHIFT) qtx_ctl |= ((hw->pf_id << I40E_QTX_CTL_PF_INDX_SHIFT)
& I40E_QTX_CTL_PF_INDX_MASK); & I40E_QTX_CTL_PF_INDX_MASK);
qtx_ctl |= (((vf->vf_id + hw->func_caps.vf_base_id) qtx_ctl |= (((vf->vf_id + hw->func_caps.vf_base_id)
<< I40E_QTX_CTL_VFVM_INDX_SHIFT) << I40E_QTX_CTL_VFVM_INDX_SHIFT)
......
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