Commit 81b23589 authored by Dave Ertman's avatar Dave Ertman Committed by Jeff Kirsher

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: default avatarDave Ertman <david.m.ertman@intel.com>
Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 9e4ab4c2
...@@ -2130,6 +2130,7 @@ static int ice_probe(struct pci_dev *pdev, ...@@ -2130,6 +2130,7 @@ static int ice_probe(struct pci_dev *pdev,
static void ice_remove(struct pci_dev *pdev) static void ice_remove(struct pci_dev *pdev)
{ {
struct ice_pf *pf = pci_get_drvdata(pdev); struct ice_pf *pf = pci_get_drvdata(pdev);
int i;
if (!pf) if (!pf)
return; return;
...@@ -2139,6 +2140,11 @@ static void ice_remove(struct pci_dev *pdev) ...@@ -2139,6 +2140,11 @@ static void ice_remove(struct pci_dev *pdev)
ice_vsi_release_all(pf); ice_vsi_release_all(pf);
ice_free_irq_msix_misc(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_clear_interrupt_scheme(pf);
ice_deinit_pf(pf); ice_deinit_pf(pf);
ice_deinit_hw(&pf->hw); ice_deinit_hw(&pf->hw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment