From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 514CE2C21F8; Tue, 31 Mar 2026 17:01:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774976467; cv=none; b=EiyaoFDz+u5oH6ZvLBkFuwTOGTkrDjBokcBuj2FnpwrLF3svtfZPGHQxTqm/yzrK4XEskN14s+dslkTsd+lu6PqQtfYOX/7xlI6NYv/fz2piUM9xCaTHe4uZMPpj/owziIWfzY0WDoUxIYumggEniSDkZ8Q3StqhXV8B5h+eG8s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774976467; c=relaxed/simple; bh=bJ0BQPDv5EXgo8ixCwzupy2N429mcg91JwBNiDpIKPg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tuIKqwbEYTrhX2R6kXzbktQI9fAQW2R/Oa5ULZ1z9g8HuSeOKt+RtCbcB0UFJndkqf1coSFXa+xVoKVs/T/7QB8pZBmyJAWOMa68/W3Cq0KlQVZmn2YNwjxHxouOXcLaU8bZ6knpJTJlb+i+DBn4hL3ZrG///gFnavbZHc7BQRc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UQ6ngKw/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UQ6ngKw/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 618DCC19423; Tue, 31 Mar 2026 17:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774976466; bh=bJ0BQPDv5EXgo8ixCwzupy2N429mcg91JwBNiDpIKPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UQ6ngKw/kp0DneujxUlMlfB4/M5Qa0IX1E7ZAWy2o/yW8pcyOP1Z7iZ+f/iRdAvDa KG61diy84G3mYZ2jV89ZB5j5TRMx3+AfWfEpYfEIKk/LBGvYWBbcVpO2uIYOs3bRzU WPeEGUP+GS2WDVHueyYzP8TGwbLJX7JXqpxr8zYs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Petr Oros , Aleksandr Loktionov , Michal Swiatkowski , Patryk Holda , Tony Nguyen , Sasha Levin Subject: [PATCH 6.18 104/309] ice: fix inverted ready check for VF representors Date: Tue, 31 Mar 2026 18:20:07 +0200 Message-ID: <20260331161757.314926047@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260331161753.468533260@linuxfoundation.org> References: <20260331161753.468533260@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Petr Oros [ Upstream commit ad85de0fc09eb3236e73df5acb2bc257625103f5 ] 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 Reviewed-by: Aleksandr Loktionov Reviewed-by: Michal Swiatkowski Tested-by: Patryk Holda Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_repr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_repr.c b/drivers/net/ethernet/intel/ice/ice_repr.c index cb08746556a67..2a84f65640582 100644 --- a/drivers/net/ethernet/intel/ice/ice_repr.c +++ b/drivers/net/ethernet/intel/ice/ice_repr.c @@ -315,7 +315,7 @@ ice_repr_reg_netdev(struct net_device *netdev, const struct net_device_ops *ops) static int ice_repr_ready_vf(struct ice_repr *repr) { - return !ice_check_vf_ready_for_cfg(repr->vf); + return ice_check_vf_ready_for_cfg(repr->vf); } static int ice_repr_ready_sf(struct ice_repr *repr) -- 2.51.0