Commit de03d2b0 authored by Shannon Nelson's avatar Shannon Nelson Committed by Jeff Kirsher

i40e: Assure that adminq is alive in debug mode

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: default avatarShannon Nelson <shannon.nelson@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 69278398
...@@ -10822,6 +10822,12 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -10822,6 +10822,12 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
hw->bus.func = PCI_FUNC(pdev->devfn); hw->bus.func = PCI_FUNC(pdev->devfn);
pf->instance = pfs_found; 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) { if (debug != -1) {
pf->msg_enable = pf->hw.debug_mask; pf->msg_enable = pf->hw.debug_mask;
pf->msg_enable = debug; pf->msg_enable = debug;
...@@ -10867,12 +10873,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -10867,12 +10873,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* set up a default setting for link flow control */ /* set up a default setting for link flow control */
pf->hw.fc.requested_mode = I40E_FC_NONE; 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); err = i40e_init_adminq(hw);
if (err) { if (err) {
if (err == I40E_ERR_FIRMWARE_API_VERSION) if (err == I40E_ERR_FIRMWARE_API_VERSION)
...@@ -11265,7 +11265,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -11265,7 +11265,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
kfree(pf->qp_pile); kfree(pf->qp_pile);
err_sw_init: err_sw_init:
err_adminq_setup: err_adminq_setup:
(void)i40e_shutdown_adminq(hw);
err_pf_reset: err_pf_reset:
iounmap(hw->hw_addr); iounmap(hw->hw_addr);
err_ioremap: err_ioremap:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment