i40e: use pf_id for pf function id in qtx_ctl
authorShannon Nelson <shannon.nelson@intel.com>
Sat, 28 Sep 2013 07:14:19 +0000 (07:14 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 22 Oct 2013 13:43:05 +0000 (06:43 -0700)
Simplify code by using an already existing variable.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 727d14df89ce3eaac4f36708baf9cf47a01c388e..d8893426b8155a484d131f92d5c79085c20dd132 100644 (file)
@@ -2174,8 +2174,8 @@ static int i40e_configure_tx_ring(struct i40e_ring *ring)
 
        /* Now associate this queue with this PCI function */
        qtx_ctl = I40E_QTX_CTL_PF_QUEUE;
-       qtx_ctl |= ((hw->hmc.hmc_fn_id << I40E_QTX_CTL_PF_INDX_SHIFT)
-                                               & I40E_QTX_CTL_PF_INDX_MASK);
+       qtx_ctl |= ((hw->pf_id << I40E_QTX_CTL_PF_INDX_SHIFT) &
+                   I40E_QTX_CTL_PF_INDX_MASK);
        wr32(hw, I40E_QTX_CTL(pf_q), qtx_ctl);
        i40e_flush(hw);
 
index 35f49090b3ec00bf9ba0b93df801404e1505a26b..07596982a4773fc942a5a0c3b8a458bdaa837768 100644 (file)
@@ -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 */
        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);
        qtx_ctl |= (((vf->vf_id + hw->func_caps.vf_base_id)
                     << I40E_QTX_CTL_VFVM_INDX_SHIFT)