From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 681E9C88E5A for ; Fri, 11 Sep 2026 21:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eF2zdbvuflY5doNoW+50hx8vDNZ+Z3JDjCoh+Vqsa14=; b=PYpgD7D9zwGepst/zj9/IoqyW+ X6WacDjl0oz2oRwxuuKyI0p/cTGvq9KMWtugpmQqmQS4yz4fBbdnDFHuCdWcEU5DRWjK/tTqLO5EB bdCucotF27mZvMUhyUcePertLs5/suafo2HQ9WCKiHfQOCKpYLG38v0TTqTDfSmU3tIygY+zJ2qcg C5p8/ADd+jVY4IEhi8FndP86S5VFskroNf94DpwSUUiTIkw6jwotOwcBz/JpgqxvjrSJ2BKGMsY8J POKrVmonN7hC07F1vNna0E4yr2qKuGMGF9n+n1YyGE8hqeEv5SQm0btrd/VKV7KtY8vcPv3wbijIq Jh0ZGj5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x58gX-000000009vD-318J; Fri, 11 Sep 2026 21:21:25 +0000 Received: from smtpout-02.galae.net ([185.246.84.56]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x58gO-000000009np-3VUf for linux-arm-kernel@lists.infradead.org; Fri, 11 Sep 2026 21:21:18 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 595861A0226; Fri, 11 Sep 2026 21:21:15 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2C4A2601A3; Fri, 11 Sep 2026 21:21:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1D88B11C7AFB3; Fri, 11 Sep 2026 23:21:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1789161669; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=eF2zdbvuflY5doNoW+50hx8vDNZ+Z3JDjCoh+Vqsa14=; b=rg4zCM4jIoD79xSsIv0sEGbwKw4LfyNp8x8Ch7e6QNCzO/Q8ayOupTucHT5HFR+q5woMS4 MeHpt2Vo73w3dgIa2xgAeDOC263ElleWLUhXb1QPAr3YoJH72EjW0TnqSaNTr4ZLvUD91u N7Z4vkA5mcT9EZKaGEfBrVoFfCPtIUbhZdCT+1/PsmYKf2pVbn1Iqz1EIgIvbvVPKpNuBe 59D+6Zz5uFrxcROKyzCpivEg3hHld90NVldvK7YPufe4+Zqf0BpemQQGT6LFVByp7G64+1 eZ39k1v+0b8ZGwarg3++yc5BE2/6LgCN0Yp6EusgaxuphNH3E614FpQ/YLMTIQ== From: Maxime Chevallier To: Andrew Lunn , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Heiner Kallweit , =?UTF-8?q?Alexis=20Lothor=C3=A9?= , Maxime Coquelin , Alexandre Torgue , Emil Renner Berthing , Minda Chen , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Jan Petrous , Ovidiu Panait , Jose.Abreu@synopsys.com, Nicolai Buchwitz Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, PKneuper@dspace.de, David Laight Subject: [PATCH net v3 3/6] net: stmmac: selftests: Check the dev->features for S-TAG offload testing Date: Fri, 11 Sep 2026 23:20:23 +0200 Message-ID: <20260911212028.1497613-4-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260911212028.1497613-1-maxime.chevallier@bootlin.com> References: <20260911212028.1497613-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260911_142117_018868_805BA444 X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 df28741abf2b..7f5837d1fed9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -1410,7 +1410,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.55.0