i40e: clear AQ head and tail registers
authorShannon Nelson <shannon.nelson@intel.com>
Sat, 16 Nov 2013 10:00:35 +0000 (10:00 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 6 Dec 2013 07:12:58 +0000 (23:12 -0800)
During admin queue shutdown clear some more registers
explicitly.

Change-Id: Ifb235c691e1c55e76bf66e0642207f464153d05a
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_adminq.c

index cfef7fc32cdd4643382f6d0125589fd1e3de6a95..2bf73dda160b5e29c1b12d7e6b7c12aaf454bb4d 100644 (file)
@@ -466,10 +466,15 @@ static i40e_status i40e_shutdown_asq(struct i40e_hw *hw)
                return I40E_ERR_NOT_READY;
 
        /* Stop firmware AdminQ processing */
-       if (hw->mac.type == I40E_MAC_VF)
+       if (hw->mac.type == I40E_MAC_VF) {
                wr32(hw, I40E_VF_ATQLEN1, 0);
-       else
+               wr32(hw, I40E_VF_ATQH1, 0);
+               wr32(hw, I40E_VF_ATQT1, 0);
+       } else {
                wr32(hw, I40E_PF_ATQLEN, 0);
+               wr32(hw, I40E_PF_ATQH, 0);
+               wr32(hw, I40E_PF_ATQT, 0);
+       }
 
        /* make sure lock is available */
        mutex_lock(&hw->aq.asq_mutex);
@@ -500,10 +505,15 @@ static i40e_status i40e_shutdown_arq(struct i40e_hw *hw)
                return I40E_ERR_NOT_READY;
 
        /* Stop firmware AdminQ processing */
-       if (hw->mac.type == I40E_MAC_VF)
+       if (hw->mac.type == I40E_MAC_VF) {
                wr32(hw, I40E_VF_ARQLEN1, 0);
-       else
+               wr32(hw, I40E_VF_ARQH1, 0);
+               wr32(hw, I40E_VF_ARQT1, 0);
+       } else {
                wr32(hw, I40E_PF_ARQLEN, 0);
+               wr32(hw, I40E_PF_ARQH, 0);
+               wr32(hw, I40E_PF_ARQT, 0);
+       }
 
        /* make sure lock is available */
        mutex_lock(&hw->aq.arq_mutex);