summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorDave Ertman <david.m.ertman@intel.com>2018-09-19 17:43:07 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-10-02 07:20:31 -0700
commit81b23589f4830b672ffbad7162fc838c6791d22a (patch)
tree33b29609b47911b2077b25077a33d03d0fa7a8a6 /drivers/net/ethernet
parent9e4ab4c29a62d2ccbf4be42707669be2f42d391c (diff)
downloadblackbird-op-linux-81b23589f4830b672ffbad7162fc838c6791d22a.tar.gz
blackbird-op-linux-81b23589f4830b672ffbad7162fc838c6791d22a.zip
ice: Fix error on driver remove
If the driver is unloaded when traffic is in progress, errors are generated. Fix this by releasing qvectors and NAPI handler on remove. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@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/ice/ice_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 9638684f75ac..46ccf265c218 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -2130,6 +2130,7 @@ err_exit_unroll:
static void ice_remove(struct pci_dev *pdev)
{
struct ice_pf *pf = pci_get_drvdata(pdev);
+ int i;
if (!pf)
return;
@@ -2139,6 +2140,11 @@ static void ice_remove(struct pci_dev *pdev)
ice_vsi_release_all(pf);
ice_free_irq_msix_misc(pf);
+ ice_for_each_vsi(pf, i) {
+ if (!pf->vsi[i])
+ continue;
+ ice_vsi_free_q_vectors(pf->vsi[i]);
+ }
ice_clear_interrupt_scheme(pf);
ice_deinit_pf(pf);
ice_deinit_hw(&pf->hw);
OpenPOWER on IntegriCloud