Commit c74d588e authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

igb: Make certain one vector is always assigned in igb_request_irq

This change makes certain that one interrupt is always initialized in
igb_request_irq.  In addition we drop the use of adapter->pdev and
instead just call pdev since we made a local copy of the pointer earlier in
the function.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarAaron Brown  <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 0d1ae7f4
...@@ -1262,7 +1262,7 @@ static int igb_request_irq(struct igb_adapter *adapter) ...@@ -1262,7 +1262,7 @@ static int igb_request_irq(struct igb_adapter *adapter)
goto request_done; goto request_done;
/* fall back to MSI */ /* fall back to MSI */
igb_clear_interrupt_scheme(adapter); igb_clear_interrupt_scheme(adapter);
if (!pci_enable_msi(adapter->pdev)) if (!pci_enable_msi(pdev))
adapter->flags |= IGB_FLAG_HAS_MSI; adapter->flags |= IGB_FLAG_HAS_MSI;
igb_free_all_tx_resources(adapter); igb_free_all_tx_resources(adapter);
igb_free_all_rx_resources(adapter); igb_free_all_rx_resources(adapter);
...@@ -1284,12 +1284,12 @@ static int igb_request_irq(struct igb_adapter *adapter) ...@@ -1284,12 +1284,12 @@ static int igb_request_irq(struct igb_adapter *adapter)
} }
igb_setup_all_tx_resources(adapter); igb_setup_all_tx_resources(adapter);
igb_setup_all_rx_resources(adapter); igb_setup_all_rx_resources(adapter);
} else {
igb_assign_vector(adapter->q_vector[0], 0);
} }
igb_assign_vector(adapter->q_vector[0], 0);
if (adapter->flags & IGB_FLAG_HAS_MSI) { if (adapter->flags & IGB_FLAG_HAS_MSI) {
err = request_irq(adapter->pdev->irq, igb_intr_msi, 0, err = request_irq(pdev->irq, igb_intr_msi, 0,
netdev->name, adapter); netdev->name, adapter);
if (!err) if (!err)
goto request_done; goto request_done;
...@@ -1299,11 +1299,11 @@ static int igb_request_irq(struct igb_adapter *adapter) ...@@ -1299,11 +1299,11 @@ static int igb_request_irq(struct igb_adapter *adapter)
adapter->flags &= ~IGB_FLAG_HAS_MSI; adapter->flags &= ~IGB_FLAG_HAS_MSI;
} }
err = request_irq(adapter->pdev->irq, igb_intr, IRQF_SHARED, err = request_irq(pdev->irq, igb_intr, IRQF_SHARED,
netdev->name, adapter); netdev->name, adapter);
if (err) if (err)
dev_err(&adapter->pdev->dev, "Error %d getting interrupt\n", dev_err(&pdev->dev, "Error %d getting interrupt\n",
err); err);
request_done: request_done:
......
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