Message ID | 20191009140953.14087-6-anthony.l.nguyen@intel.com |
---|---|
State | Accepted |
Delegated to: | Jeff Kirsher |
Headers | show |
Series | [S31,01/15] ice: implement set_eeprom functionality | expand |
> -----Original Message----- > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On > Behalf Of Tony Nguyen > Sent: Wednesday, October 9, 2019 7:10 AM > To: intel-wired-lan@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH S31 06/15] ice: fix driver unload flow > > From: Bruce Allan <bruce.w.allan@intel.com> > > 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: Bruce Allan <bruce.w.allan@intel.com> > --- > drivers/net/ethernet/intel/ice/ice_main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 3f8f0ad41258..09a507e97f8f 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -3603,12 +3603,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); }