i40e: configure VM ID in qtx_ctl
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 17 Oct 2014 03:14:52 +0000 (03:14 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 3 Nov 2014 12:19:28 +0000 (04:19 -0800)
We must insert the VSI ID in the QTX_CTL register when
configuring queues for VMDQ VSIs.

Change-ID: Iedfe36bd42ca0adc90a7cc2b7cf04795a98f4761
Reported-by: Marc Neustadter <marc.neustadter@intel.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Patrick Lu <patrick.lu@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index ea622676ebe76f17822369c70e1c8ddf98b60aa0..1b0c437dae211701388da429b9a3d2a10f367309 100644 (file)
@@ -2462,10 +2462,14 @@ static int i40e_configure_tx_ring(struct i40e_ring *ring)
        }
 
        /* Now associate this queue with this PCI function */
-       if (vsi->type == I40E_VSI_VMDQ2)
+       if (vsi->type == I40E_VSI_VMDQ2) {
                qtx_ctl = I40E_QTX_CTL_VM_QUEUE;
-       else
+               qtx_ctl |= ((vsi->id) << I40E_QTX_CTL_VFVM_INDX_SHIFT) &
+                          I40E_QTX_CTL_VFVM_INDX_MASK;
+       } else {
                qtx_ctl = I40E_QTX_CTL_PF_QUEUE;
+       }
+
        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);