]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ice: fix inverted ready check for VF representors
authorPetr Oros <poros@redhat.com>
Thu, 12 Feb 2026 07:53:10 +0000 (08:53 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 23 Mar 2026 19:54:23 +0000 (12:54 -0700)
commitad85de0fc09eb3236e73df5acb2bc257625103f5
treec1ffcad7db63c1187c6373ab9e7f74c320da8bb3
parentc7fcd269e1e07b2aa4bb37ffce7543c340796433
ice: fix inverted ready check for VF representors

Commit 0f00a897c9fcbd ("ice: check if SF is ready in ethtool ops")
refactored the VF readiness check into a generic repr->ops.ready()
callback but implemented ice_repr_ready_vf() with inverted logic:

  return !ice_check_vf_ready_for_cfg(repr->vf);

ice_check_vf_ready_for_cfg() returns 0 on success, so the negation
makes ready() return non-zero when the VF is ready. All callers treat
non-zero as "not ready, skip", causing ndo_get_stats64, get_drvinfo,
get_strings and get_ethtool_stats to always bail out in switchdev mode.

Remove the erroneous negation. The SF variant ice_repr_ready_sf() is
already correct (returns !active, i.e. non-zero when not active).

Fixes: 0f00a897c9fcbd ("ice: check if SF is ready in ethtool ops")
Signed-off-by: Petr Oros <poros@redhat.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Patryk Holda <patryk.holda@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_repr.c