From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2B2D351A73A; Wed, 30 Sep 2026 18:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790793094; cv=none; b=H2Cgr6y5cHjtNl23PXZC7HlD3//A0L8qi10Ycghkpv/7Fc2qnXR1hBpEuX3a/3jTYgxSCjDnCjRiGEva0cFZomLg71z9AkKpbrTt+hVkLo8DSmkWWch2psGgyl0fz+gV/T6pburfIr9k5ApH6vEaXPDYepHyUISsVDH/thIFJ5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790793094; c=relaxed/simple; bh=jjrbsuJ9E0JhsGcqpKiGD8nG0AR4CNvrQwYINHSK2YQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LE3kFsJ87OEy3++tOplqSU4NiwieYuPFRZ8ax2xYr1ShjWe1zxUd1cE1GLlmlAN8LW86iLCYdrm3oum/Hq3haGjcmttKjJFRpRHmJIXPKQgXrqvuXpD5VOUKVmFq4UlEMPnxWAQMh5jLOkMGk8r46irdUh5gRT702B0u3VeCJiQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zZYTLtru; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zZYTLtru" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86E601F000FF; Wed, 30 Sep 2026 18:31:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790793093; bh=K6O3fyYJNsQML9rRizzSt6on3u6kqCOKbLcaj8GXmTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=zZYTLtruYdxTK7QP5Sbiv1zCweYNys6ATuKCx5rxJKmn02UNOcDLzGrg6xgwwzwhT aRRYZmzgdyQKzVdYUUeienQa53sCMalbJ+e0slQt5SJopLezxUpbfKuWed34bFkK/T /wrdc0N93sK116ttChJfz3/B1awEJQsXY3AiBUq4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nicolai Buchwitz , Maxime Chevallier , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.18 134/395] net: stmmac: selftests: Check the dev->features for S-TAG offload testing Date: Wed, 30 Sep 2026 17:26:36 +0200 Message-ID: <20260930152343.550159885@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152340.591469096@linuxfoundation.org> References: <20260930152340.591469096@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev 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: Maxime Chevallier [ Upstream commit ba804b23d76d278ee475b8427fa7c5623ce5e270 ] The S-TAG offload insertion incorrectly checks the dvlan (double vlan) DMA cap, which is different than S-TAG support. Use NETIF_F_HW_VLAN_STAG_TX to check if the feature is supported instead. Note that this flag isn't set in stmmac yet, but contrary to ARP offload, this is a feature that has a chance to get there eventually so let's leave the selftest here for now. It'll report -EOPNOTSUPP in the meantime. Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support") Reviewed-by: Nicolai Buchwitz Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20260917215339.2022523-4-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c index 1d46d5004c9f4..71455457b0f3c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -1395,7 +1395,7 @@ static int stmmac_test_vlanoff(struct stmmac_priv *priv) static int stmmac_test_svlanoff(struct stmmac_priv *priv) { - if (!priv->dma_cap.dvlan) + if (!(priv->dev->features & NETIF_F_HW_VLAN_STAG_TX)) return -EOPNOTSUPP; return stmmac_test_vlanoff_common(priv, true); } -- 2.53.0