Commit c6012ac1 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher
Browse files

ice: fix driver unload flow



As part of the driver unload flow, a PF reset is issued which may still
cause an interrupt to be generated by the device.  Do not clear the
interrupt scheme until the reset is complete and there are no pending
transactions otherwise a hardware error may occur.

Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent cfbf1367
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3348,12 +3348,13 @@ static void ice_remove(struct pci_dev *pdev)
	}
	ice_deinit_pf(pf);
	ice_deinit_hw(&pf->hw);
	ice_clear_interrupt_scheme(pf);
	/* Issue a PFR as part of the prescribed driver unload flow.  Do not
	 * do it via ice_schedule_reset() since there is no need to rebuild
	 * and the service task is already stopped.
	 */
	ice_reset(&pf->hw, ICE_RESET_PFR);
	pci_wait_for_pending_transaction(pdev);
	ice_clear_interrupt_scheme(pf);
	pci_disable_pcie_error_reporting(pdev);
}