aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_vf_lib.c
diff options
context:
space:
mode:
authorNorbert Zulinski <norbertx.zulinski@intel.com>2022-10-10 10:22:22 -0400
committerTony Nguyen <anthony.l.nguyen@intel.com>2022-11-09 13:20:38 -0800
commitf23df5220d2bf8d5e639f074b76f206a736d09e1 (patch)
treeb3cfcb9f69c7a01b05a626286e1fc679f0c19176 /drivers/net/ethernet/intel/ice/ice_vf_lib.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf (diff)
downloadlinux-dev-f23df5220d2bf8d5e639f074b76f206a736d09e1.tar.xz
linux-dev-f23df5220d2bf8d5e639f074b76f206a736d09e1.zip
ice: Fix spurious interrupt during removal of trusted VF
Previously, during removal of trusted VF when VF is down there was number of spurious interrupt equal to number of queues on VF. Add check if VF already has inactive queues. If VF is disabled and has inactive rx queues then do not disable rx queues. Add check in ice_vsi_stop_tx_ring if it's VF's vsi and if VF is disabled. Fixes: efe41860008e ("ice: Fix memory corruption in VF driver") Signed-off-by: Norbert Zulinski <norbertx.zulinski@intel.com> Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_vf_lib.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_vf_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.c b/drivers/net/ethernet/intel/ice/ice_vf_lib.c
index 0abeed092de1..1c51778db951 100644
--- a/drivers/net/ethernet/intel/ice/ice_vf_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.c
@@ -576,7 +576,10 @@ int ice_reset_vf(struct ice_vf *vf, u32 flags)
return -EINVAL;
}
ice_vsi_stop_lan_tx_rings(vsi, ICE_NO_RESET, vf->vf_id);
- ice_vsi_stop_all_rx_rings(vsi);
+
+ if (ice_vsi_is_rx_queue_active(vsi))
+ ice_vsi_stop_all_rx_rings(vsi);
+
dev_dbg(dev, "VF is already disabled, there is no need for resetting it, telling VM, all is fine %d\n",
vf->vf_id);
return 0;