]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: Assure that adminq is alive in debug mode
authorShannon Nelson <shannon.nelson@intel.com>
Thu, 10 Mar 2016 22:59:44 +0000 (14:59 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 17:40:45 +0000 (10:40 -0700)
Orabug: 23176970

When dropping into debug mode in a failed probe, make sure that
the AdminQ is left alive for possible hand debug of driver and
firmware states.

Move the mutex_init calls earlier in probe so that if init fails,
the admin queue interface is still available for debugging purposes.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit de03d2b0ef6520cf9da2e429cd7afb534782b737)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index b7345e8b1ad2aa23e98559f15190f3c999eae983..27f7bfd3341c2af47c14b7389ac0712b54c155b4 100644 (file)
@@ -10694,6 +10694,12 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        hw->bus.func = PCI_FUNC(pdev->devfn);
        pf->instance = pfs_found;
 
+       /* set up the locks for the AQ, do this only once in probe
+        * and destroy them only once in remove
+        */
+       mutex_init(&hw->aq.asq_mutex);
+       mutex_init(&hw->aq.arq_mutex);
+
        if (debug != -1) {
                pf->msg_enable = pf->hw.debug_mask;
                pf->msg_enable = debug;
@@ -10739,12 +10745,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        /* set up a default setting for link flow control */
        pf->hw.fc.requested_mode = I40E_FC_NONE;
 
-       /* set up the locks for the AQ, do this only once in probe
-        * and destroy them only once in remove
-        */
-       mutex_init(&hw->aq.asq_mutex);
-       mutex_init(&hw->aq.arq_mutex);
-
        err = i40e_init_adminq(hw);
        if (err) {
                if (err == I40E_ERR_FIRMWARE_API_VERSION)
@@ -11126,7 +11126,6 @@ err_init_lan_hmc:
        kfree(pf->qp_pile);
 err_sw_init:
 err_adminq_setup:
-       (void)i40e_shutdown_adminq(hw);
 err_pf_reset:
        iounmap(hw->hw_addr);
 err_ioremap: