i40e: clear qtx_head before enabling Tx queue
authorShannon Nelson <shannon.nelson@intel.com>
Sat, 21 Dec 2013 05:44:48 +0000 (05:44 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 11 Jan 2014 00:30:35 +0000 (16:30 -0800)
Make sure the "new" qtx_head[q] register is cleared before
enabling the Tx queue.

Change-ID: I0c7a12815e343a5ae68807af172a35d6c6857935
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

index 65c27cb1e9ec4807b19143447975a5afb8c7968f..bc14a85561f8b2e2392ee867d3e4f83f8e56cbc0 100644 (file)
@@ -3008,11 +3008,13 @@ static int i40e_vsi_control_tx(struct i40e_vsi *vsi, bool enable)
                        continue;
 
                /* turn on/off the queue */
-               if (enable)
+               if (enable) {
+                       wr32(hw, I40E_QTX_HEAD(pf_q), 0);
                        tx_reg |= I40E_QTX_ENA_QENA_REQ_MASK |
                                  I40E_QTX_ENA_QENA_STAT_MASK;
-               else
+               } else {
                        tx_reg &= ~I40E_QTX_ENA_QENA_REQ_MASK;
+               }
 
                wr32(hw, I40E_QTX_ENA(pf_q), tx_reg);