Skip to content

Commit

Permalink
ice: Fix VSI rebuild WARN_ON check for VF
Browse files Browse the repository at this point in the history
In commit b03d519 ("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: b03d519 ("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>
  • Loading branch information
bmikailenko authored and anguy11 committed Aug 11, 2022
1 parent 84ba289 commit 7fe05e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/ice/ice_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7fe05e1

Please sign in to comment.