]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ice: Fix VSI rebuild WARN_ON check for VF
authorBenjamin Mikailenko <benjamin.mikailenko@intel.com>
Fri, 15 Jul 2022 22:27:07 +0000 (18:27 -0400)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 11 Aug 2022 15:32:08 +0000 (08:32 -0700)
In commit 332317173833 ("ice: store VF pointer instead of VF ID")
WARN_ON checks were added to validate the vsi->vf pointer and
catch programming errors. However, one check to vsi->vf was missed.
This caused a call trace when resetting VFs.

Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check.

Fixes: 332317173833 ("ice: store VF pointer instead of VF ID")
Signed-off-by: Benjamin Mikailenko <benjamin.mikailenko@intel.com>
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lib.c

index a830f7f9aed050fb29939c40f26515ec58266940..0d4dbca889640ef0662f7813f6d26635812b7e30 100644 (file)
@@ -3181,7 +3181,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi)
 
        pf = vsi->back;
        vtype = vsi->type;
-       if (WARN_ON(vtype == ICE_VSI_VF) && !vsi->vf)
+       if (WARN_ON(vtype == ICE_VSI_VF && !vsi->vf))
                return -EINVAL;
 
        ice_vsi_init_vlan_ops(vsi);