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 E621931D366; Wed, 30 Sep 2026 15:56:15 +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=1790783779; cv=none; b=TxdoUM22vHLkkQdm+nq2y7ip5BzYyyaNehf96xYm09gJ8+Wnw37WObmQ5cviH1UMuyt9jL/KVquab/LoIUSx3bHJHb4dAq6aJ2yPD1ODou7DoAXM1kOFvV9DN+U4sQTyisN0/sJEBJcELw7+N+LRyk2vKSIT/ub1TlJAaxVyY9Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790783779; c=relaxed/simple; bh=6L8kgb6KBN0uJ7H6jVhqkvGa24yrnRy2vfblR4eTKqI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MeLSMeg/9ib54NnrFwL5qKhzHBGvDMm34N+ArW2x7m9HXWGqWBXxLcU0wfAUpXHK6hxM/USa1rAZ9YByzt6OxSJWLwc14f3HWAfj/Fk18JS5yGnChZpEVZn6lC+2H7uAtkQjYv+IdquPnvoQ4NIx7AsZfwU0Awu/tWoQQMwDA6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RD2KTPMK; 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="RD2KTPMK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 735261F0089A; Wed, 30 Sep 2026 15:56:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790783773; bh=T6LDngH27gvxOPXJcEy3k2aIBdPmCtdXRwml1VOQ52g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RD2KTPMKSMs7aYLBdcV5YqySaKMdE+xLsfZdKSLwekWj7qjLj5vzX9Ty+DeTQIL2q HZ1lciLNN0IOh3SS5mJEfsYVe1EIjDp3fV1yLGUP3dE0irkr3t2CcyxG99BRMXs6DX Tg5awguJ2YM7OtbIj3lynZ0jCzAYR3WXCTpe+Bmc= 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 5.10 517/595] net: stmmac: selftests: Check the dev->features for S-TAG offload testing Date: Wed, 30 Sep 2026 17:26:50 +0200 Message-ID: <20260930152358.823366418@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152347.700140858@linuxfoundation.org> References: <20260930152347.700140858@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 5.10-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 e6655787a5967..356cf9aa5c12d 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