[next,S94,08/13] i40e: Reorder irq and adminq deinitialization in i40e_remove

Message ID 20180802004036.89363-8-alice.michael@intel.com
State Superseded
Delegated to: Jeff Kirsher
Headers show
Series
  • Untitled series #58958
Related show

Commit Message

Alice Michael Aug. 2, 2018, 12:40 a.m.
From: Patryk Małek <patryk.malek@intel.com>

This is needed to allow changing of deinitialization flow in
order to skip freeing uninitialized irq when in recovery mode.

Signed-off-by: Patryk Małek <patryk.malek@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 5720d40..725b2de 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -14370,13 +14370,6 @@  static void i40e_remove(struct pci_dev *pdev)
 	}
 
 unmap:
-	/* shutdown the adminq */
-	i40e_shutdown_adminq(hw);
-
-	/* destroy the locks only once, here */
-	mutex_destroy(&hw->aq.arq_mutex);
-	mutex_destroy(&hw->aq.asq_mutex);
-
 	/* Free MSI/legacy interrupt 0 when in recovery mode.
 	 * This is normally done in i40e_vsi_free_irq on
 	 * VSI close but since recovery mode doesn't allow to up
@@ -14398,6 +14391,13 @@  static void i40e_remove(struct pci_dev *pdev)
 		}
 	}
 
+	/* shutdown the adminq */
+	i40e_shutdown_adminq(hw);
+
+	/* destroy the locks only once, here */
+	mutex_destroy(&hw->aq.arq_mutex);
+	mutex_destroy(&hw->aq.asq_mutex);
+
 	for (i = 0; i < I40E_MAX_VEB; i++) {
 		kfree(pf->veb[i]);
 		pf->veb[i] = NULL;