Article View: linux.kernel.netdev
Article #17739Re: [PATCH net] net: stmmac: re-enable on-chip parity checkers for XGMAC ASP 0x2
From: Nicolai Buchwitz
Date: Tue, 17 Nov 2026 09:26
Date: Tue, 17 Nov 2026 09:26
100 lines
12698 bytes
12698 bytes
On 14.11.2026 02:55, Zxyan Zhu wrote:
> Commit 669a55560e4b ("net: stmmac: Check more MAC HW features for XGMAC
> Core 3.20") made dwxgmac3_safety_feat_config() bail out early for
> asp == 0x2, assuming that configuration has no parity protection.
>
> Per the DWC_xgmac databook, the ASP field of MAC_HW_Feature3 selects:
>
> 0x1 (AS_EPPE): all automotive safety features, with ECC and parity
> ports on the external application interface
> 0x2 (AS_NEPPE): all automotive safety features, without ECC or
> parity ports on the external application interface
> 0x3 (AS_PPE): all automotive safety features, with parity ports
> on the external application interface
>
> The reset value of the field is defined as:
>
> (DWCXG_ASP_ALL && DWCXG_ASP_PPE == 1) ? "3"
> : (DWCXG_ASP_ALL && DWCXG_ASP_PPE == 0) ? "2"
> : (DWCXG_ASP_ALL && DWCXG_ASP_PPE == 2) ? "1" : "0"
>
> so ASP 0x2 implies DWCXG_ASP_ALL = 1, where the internal FSM state
> parity and timeout (MAC_FSM_Control) and the on-chip data-path parity
> (MTL_DPP_CONTROL) features exist; only the ports on the external
> application interface are absent. The early return therefore skips
> enabling safety checkers that are present in the hardware.
>
> Drop 0x2 from the condition so the FSM and data-path parity checkers
> are enabled again.
>
> Also update the safety feature descriptions printed by
> stmmac_dma_cap_show() to spell out that ASP 0x1/0x2/0x3 differ only
> in the ECC or parity ports on the external application interface; the
> previous wording, "All Safety Features without ECC or Parity",
> suggests the on-chip checkers are absent from an ASP 0x2 device.
>
> Keep the early return for ASP 0x4 (EASP), which selects only ECC
> protection for external memory and has no on-chip parity features.
>
> Tested on XGMAC 3.10 and 3.40 cores.
>
> Fixes: 669a55560e4b ("net: stmmac: Check more MAC HW features for XGMAC
> Core 3.20")
> Cc: stable@vger.kernel.org
> Signed-off-by: Zxyan Zhu <zxyan0222@gmail.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 6 +++---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> index 1a88cbaed70c..6b2bfc241109 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> @@ -859,10 +859,10 @@ dwxgmac3_safety_feat_config(void __iomem *ioaddr,
> unsigned int asp,
> value |= XGMAC_TCEIE; /* TSO Memory Correctable Error */
> writel(value, ioaddr + XGMAC_DMA_ECC_INT_ENABLE);
>
> - /* 0x2: Without ECC or Parity Ports on External Application Interface
> - * 0x4: Only ECC Protection for External Memory feature is selected
> + /* 0x4: Only ECC Protection for External Memory feature is
> + * selected, without any on-chip parity protection
> */
> - if (asp == 0x2 || asp == 0x4)
> + if (asp == 0x4)
> return 0;
>
> /* 4. Enable Parity and Timeout for FSM */
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 25894771e9e9..24f887df88fa 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -6741,9 +6741,9 @@ static int stmmac_dma_cap_show(struct seq_file
> *seq, void *v)
> };
> static const char * const dwxgmac_safety_feature_desc[] = {
> "No",
> - "All Safety Features with ECC and Parity",
> - "All Safety Features without ECC or Parity",
> - "All Safety Features with Parity Only",
> + "All Safety Features with ECC and Parity Ports on External
> Application Interface",
> + "All Safety Features without ECC or Parity Ports on External
> Application Interface",
> + "All Safety Features with Parity Ports on External Application
> Interface",
> "ECC Only",
> "UNDEFINED",
> "UNDEFINED",
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Thanks,
Nicolai
Technical Details
Message-ID:
<e041744a3817153bfe5269053d0a9260@tipi-net.de>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365105-linux-kernel-netdev=dewy.ruReferences:
<20261114015554.2187341-1-zxyan0222@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365105-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: stmmac: re-enable on-chip parity checkers for XGMAC ASP 0x2 Date: Tue, 17 Nov 2026 10:26:01 +0100 Organization: Usenet Network Message-ID: <e041744a3817153bfe5269053d0a9260@tipi-net.de> References: <20261114015554.2187341-1-zxyan0222@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2290908"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:GxyzSb3HzypJwmNJGINyfKMSVYs= sha256:iVq9sGPFKPqfUrm6q/X6SQy2CB+ydWcwUEz3WJANYjM= sha1:ABSnbeMgyzW2rX8lVxhyXqG9Uhc= sha256:3A7eFcIA7/tkmnYuO3g7pOFo20/exqal5F0VOrEQKrY= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 37DA4114EC5; Tue, 17 Nov 2026 12:26:34 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=tipi-net.de X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yMJ6q8ENdzeg; Tue, 17 Nov 2026 12:26:26 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-365105-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id AB268114EC3; Tue, 17 Nov 2026 12:26:15 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id F031D37864; Tue, 17 Nov 2026 09:26:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794907573; b=Rp89PdG77bgTCSmsTeuvyqpeX7SN7J8iqYKvqZMR4ZKbwfgynfADo3go1oiZKwtYdY4j 1LMgbqL9xnI102mUVhZiH3IfIGcdNLvnXbHOVIwsEyAQJLZY13Q8daey4etZDpG9bouZj oSbSIibC8i7Gx3pLHbgSaorT9DvOewUP/mYsWnyTaOfNxbsugLeyFMRqzXUoiMK+MV/6g I+DE+kAFmgDM8cSONrucYmhxFKPjxC7uqX5qiU+zD85noACa/lUmiPp1DS2vr3HZBa9+M XfkV87v/Ui8kyzM8Vk4NTAY299wOZb2EYkBwSFkZmQqGBkUN0GMpSNKh+IcJfWjW9VQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794907573; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=WArVX4RHsDBbDlMB9jeJsbFXO9eOXVjEfVktWuU8cPM=; b=YlGdjRboxtyG3mi187svxpMYrKhGSDLP4WALAeEU9BIe3J7Wu94ezDkKSIELO3Ny4xuK Ygkq/rvWs01qpcLU+IpI8AUIBdQt67fbSArDfHUPfPV3jDHy7wG+aYR9PMB+pRflL6CKC gHlkgQikPX/WsU0QDOgLPSC1Xk5HQo9XsbtMYwO/DMFDg5ENA77PYR/r+pTQ9pTY6U4mH 7OnivITP5cToGVtCvLCbQhe6LVWQLMcGFZMZND6alFczd93G+FJUbNTzqSAbmRglWDAsW SEVVljoCI/rCgzu065Hw0AemUUwLm9SGNUB0Ht5LRrXDqjoMbQ+eJ6s4rFi6LDbPk5Q== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=FW+OZ4fD; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C48D4606A334; Tue, 17 Nov 2026 09:26:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=FW+OZ4fD X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794907568; b=U8V2bx/av0xh2YM1n4qypc7O6d8WimR73k3MNB0XHwx8oSuxvdCOVQ6J+8uubRFOlWmf 6wB0c+Z6PWjceEPM1gzJbvJum/Y9Bn3uhsgDEPMCOrygdh4R4FshXwVTi9J0YXjPBLSlE V4JJ1bzQfnYzg284HSYTy/ejl8neUT5ZfWn839eWda+N8q1GHK9N//WlM7mzd5tRwmUb/ EmAoIXqn5OBu1KxMb8kKlAmKsLaeqGbMnpPVcMxR+qwPTr/aLA1JrxwrIEYyXa5LkSRdC 3F/A8bqCD/XAR8wOGMY5idNGiEUD3SrfsHZ+RfW4GoGkTpiyAjJZKVH5IuBLYFVa+cg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794907568; h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=WArVX4RHsDBbDlMB9jeJsbFXO9eOXVjEfVktWuU8cPM=; b=Ff8yG2Rncyo0mUxikvXhP8eVWn0xZM7ZELPsGc21m3UZ6lMYU/CkTHuSMyiG7aNwIbUY hC5o9733ZV3tt5MBPh/rDxN3Nfxhoo4zZfCAbhmC/TegGmkXhflI9Mhn75qDFeqLxTO8n +lkJbPzhBo2tiONXFYKbRxxpkcOlEo26KIGHgE5pgx2fpR8kFvSJ3NZGpPp8KhPMdSRWc RHT3HRciqB67wKpICVozPp2XQd8cZOzuaaRZxMiQirY97UlojtwrvfDR/3lMq1Z/ys5KB 9J1lKB+he6xRMKWNqSZbQzjBVClFgKHOaoojgRW/JB44WXYCh0eBlLib8GLuB/3wWnA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=FW+OZ4fD; arc=none smtp.remote-ip=194.13.80.246 X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42719606A329; Tue, 17 Nov 2026 09:26:07 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 42719606A329 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3C9D3A1649; Tue, 17 Nov 2026 10:26:02 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1794907565; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=WArVX4RHsDBbDlMB9jeJsbFXO9eOXVjEfVktWuU8cPM=; b=FW+OZ4fDSt2alBajQx7uaqezbygOJtYL72/kkl7KfcNuHwWUB3oBK3KFvyyZiPWWCXMDD8 uKvAEAu1EOBgDwBYCgXs4rhB+h6QmXiJXt+j4zArt3v+5JWppgfws56/ulFuBNTexuO2Ro t5/9q4FYt7yz9keCy3hrLfW3q2JjrPNRRIV9z+6Yxup2xbUcYHh6Bv4tYm3AwG3HMd3XEL qWoAoIRRPlnCLEZ5GskvUK129HDkyp/Pl6yJwKHnDEyYF6bldUdV2TK56hzyhBWoeFojH0 QQpU+4hh3p4AqTHBbHXH0nYQqzS2miZ2XA/gM4HjiGma13u4B6EyAoj4SzbBIg== X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Cc: maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, horms@kernel.org, 0x1207@gmail.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org X-In-Reply-To: <20261114015554.2187341-1-zxyan0222@gmail.com> X-Sender: nb@tipi-net.de X-Last-TLS-Session-Version: TLSv1.3