aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@intel.com>2015-02-21 01:44:33 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-02-26 07:54:02 -0500
commite147758d9aef1e41dad331b21df206200cf16e80 (patch)
tree93b64f79c65977429d6fe409e8dbeefece397755 /drivers/net/ethernet
parent85e76d0312a373a1268b88a7a442c6004e0c6063 (diff)
i40e: disconnect irqs on shutdown
Combine the ICR0 shutdown with the standard interrupt shutdown, and add the interrupt clearing to the PCI shutdown path. This prevents the driver from allowing stray interrupts or causing system logs from un-handled interrupts. Change-ID: I48f6ab95cad7f8ca77c1f26c92a51cc1034ced43 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 9751465f29c7..8bfd2545122d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3842,6 +3842,12 @@ static void i40e_clear_interrupt_scheme(struct i40e_pf *pf)
3842{ 3842{
3843 int i; 3843 int i;
3844 3844
3845 i40e_stop_misc_vector(pf);
3846 if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
3847 synchronize_irq(pf->msix_entries[0].vector);
3848 free_irq(pf->msix_entries[0].vector, pf);
3849 }
3850
3845 i40e_put_lump(pf->irq_pile, 0, I40E_PILE_VALID_BIT-1); 3851 i40e_put_lump(pf->irq_pile, 0, I40E_PILE_VALID_BIT-1);
3846 for (i = 0; i < pf->num_alloc_vsi; i++) 3852 for (i = 0; i < pf->num_alloc_vsi; i++)
3847 if (pf->vsi[i]) 3853 if (pf->vsi[i])
@@ -9578,12 +9584,6 @@ static void i40e_remove(struct pci_dev *pdev)
9578 if (pf->vsi[pf->lan_vsi]) 9584 if (pf->vsi[pf->lan_vsi])
9579 i40e_vsi_release(pf->vsi[pf->lan_vsi]); 9585 i40e_vsi_release(pf->vsi[pf->lan_vsi]);
9580 9586
9581 i40e_stop_misc_vector(pf);
9582 if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
9583 synchronize_irq(pf->msix_entries[0].vector);
9584 free_irq(pf->msix_entries[0].vector, pf);
9585 }
9586
9587 /* shutdown and destroy the HMC */ 9587 /* shutdown and destroy the HMC */
9588 if (pf->hw.hmc.hmc_obj) { 9588 if (pf->hw.hmc.hmc_obj) {
9589 ret_code = i40e_shutdown_lan_hmc(&pf->hw); 9589 ret_code = i40e_shutdown_lan_hmc(&pf->hw);
@@ -9737,6 +9737,8 @@ static void i40e_shutdown(struct pci_dev *pdev)
9737 wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0)); 9737 wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
9738 wr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0)); 9738 wr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));
9739 9739
9740 i40e_clear_interrupt_scheme(pf);
9741
9740 if (system_state == SYSTEM_POWER_OFF) { 9742 if (system_state == SYSTEM_POWER_OFF) {
9741 pci_wake_from_d3(pdev, pf->wol_en); 9743 pci_wake_from_d3(pdev, pf->wol_en);
9742 pci_set_power_state(pdev, PCI_D3hot); 9744 pci_set_power_state(pdev, PCI_D3hot);