From: Bruce Allan Date: Fri, 2 Aug 2019 08:25:29 +0000 (-0700) Subject: ice: add needed PFR during driver unload X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=18057cb3578ae950c73b20588ad66a1f45fba68c;p=openwrt%2Fstaging%2Fblogic.git ice: add needed PFR during driver unload According to the specification, a PF Reset must be done as part of the driver unload flow. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index b62c01ca9c28..8217b81eb9d8 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -2638,6 +2638,11 @@ 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_disable_pcie_error_reporting(pdev); }