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 72D5BC47E49 for ; Thu, 25 Jan 2024 02:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pgsmYd5Yc4WbR9lX89hdQhvB1qKyofzh1a3nRDOklvE=; b=r2Laft8NJMXXae bF7JkRP4b4GrxShofkEDjVnmWw/26VhfpbF/3PCyNZbcYK5Tf98TYCCd7ljXm4LM+PM/p7YTMj/hV Y1LE7cLeqo3sk6d77dRXJDi9javrc+Ouuj4Xv93+uwY2Fq915+8iGgb9Ust1kvvmBDbvwGlNgBtls IgO6qyQdHHBexfeGR5wiAzWWDcsxP/TWknqpO/8fbcSjWTwVtloa7zt6UZbl2OF8dCD9SXoSopZts WcwUukzhebVtL3RvBFiawzqCBMU6khWZYvbS/mD2pIRh5WMOmCJLPUOI1JwJdq9YgcyethU+T5FkE gjPMrgZB06LHS2o8j3fQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSpaC-005uj9-2V; Thu, 25 Jan 2024 02:35:12 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSpa9-005ui2-2B for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 02:35:11 +0000 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-29026523507so4698513a91.0 for ; Wed, 24 Jan 2024 18:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706150108; x=1706754908; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ElI5s79820kPutuntGaxiQesjo2hgbJF7ifEMpPB0Eg=; b=h6HI3z9a5iTeSK5XGvJx61ljagbBiBD9+dNNI/vvO1KpEzZsHlxg3QCmyjfgmqFwOF 4d/5pN2ygVSTPTe8MW2xFIe3mmDpx8VtLEUWeLklkMUO8Y21jC9zWzsqZAStaf8FLy5h 1saJGzNaZSDVPpOfxW5q6CYiaeI5k1l6Af+fy6rEB7ooVc+qPrvt7gw+12S21hOZ1/Xl k5gbyxvSMeLepGUOrMe26TOuH7hYZ/hHxb9rbH1l+LLac2R3ZoROACZx+CFO9hinpiks FMUv0xVHsXHWSuUX1HzjAXi549euMwLpTbO4+qOoYKxasQ7m3AXKalZyMejYAzFuMZ4H mr7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706150108; x=1706754908; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ElI5s79820kPutuntGaxiQesjo2hgbJF7ifEMpPB0Eg=; b=T3pLyocv3pLliJnG+TMqyFvsAD9zvA1s3XnQAYguprHsr8XAv+NphSNWpE2xiVRKJF X4oTmSue7Nv5nEUjYj/kQTMJOhZ4fGJpzv5pzEHdMKGJ07mKd4538Blnj8wBOcpM+1N+ AQn8BDMAomwio9UeuwYz6/eKMmhaIEB0UXFSaikoXMjRSAOcCsjJKHLaO2/XrWee4Uu6 +jJHUSodag3fgPL+YLDpOA92cQDxtYQC0mSQYmx46N5gbmnC/nXvYE8dDVgXh0zB0Sz1 JWQ9sjAxTfa6ZOySWzKsSjsjEoJ/nqzkP5ZBsTWobL2IXt7LHPDAgyk4YE2nCmMKbtpH iKDw== X-Gm-Message-State: AOJu0Yzxz4j2aSU3ZQ4FPpaKia9x5yyFfDVYC/s5zHjSpv0xL5EelmcM H6TVZkWRgCW9dnNNtsoxuLG22oJcKCaTFoeUS8710iwIp7hHZQMD X-Google-Smtp-Source: AGHT+IH0qJiBgXBUOvhArhS7A5BZqdhwGL4PVANneN5oH8MrPA9qqy+6X4q55NX/xqbSsqPnc7Qb7A== X-Received: by 2002:a17:90a:e543:b0:28d:dbe8:aa6c with SMTP id ei3-20020a17090ae54300b0028ddbe8aa6cmr255558pjb.36.1706150107884; Wed, 24 Jan 2024 18:35:07 -0800 (PST) Received: from localhost ([129.146.253.192]) by smtp.gmail.com with ESMTPSA id sx8-20020a17090b2cc800b0028ac1112124sm358775pjb.30.2024.01.24.18.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 18:35:07 -0800 (PST) Date: Thu, 25 Jan 2024 10:34:54 +0800 From: Furong Xu <0x1207@gmail.com> To: Serge Semin Cc: "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto , Simon Horman , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xfr@outlook.com, rock.xu@nio.com Subject: Re: [PATCH net] net: stmmac: xgmac: fix safety error descriptions Message-ID: <20240125103454.0000312a@gmail.com> In-Reply-To: References: <20240123085037.939471-1-0x1207@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_183509_728894_89DDA7DB X-CRM114-Status: GOOD ( 26.67 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 24 Jan 2024 17:25:27 +0300 Serge Semin wrote: > On Tue, Jan 23, 2024 at 04:50:37PM +0800, Furong Xu wrote: > > Commit 56e58d6c8a56 ("net: stmmac: Implement Safety Features in > > XGMAC core") prints safety error descriptions when safety error assert, > > but missed some special errors, and mixed correctable errors and > > uncorrectable errors together. > > This patch complete the error code list and print the type of errors. > > The XGMAC ECC Safety code has likely been just copied from the DW GMAC > v5 (DW QoS Eth) part. So this change is partly relevant to that code too. I > can't confirm that the special errors support is relevant to the DW > QoS Eth too (it likely is though), so what about splitting this patch > up into two: > 1. Elaborate the errors description for DW GMAC v5 and DW XGMAC. > 2. Add new ECC safety errors support. > ? > > On the other hand if we were sure that both DW QoS Eth and XGMAC > safety features implementation match the ideal solution would be to > refactor out the common code into a dedicated module. > > -Serge(y) > Checked XGMAC Version 3.20a and DW QoS Eth Version 5.20a, the safety error code definitions are not identical at all, they do have some differences, about more than 20 bits of status register are different. I think we should just leave them in individual implementations. > > > > Fixes: 56e58d6c8a56 ("net: stmmac: Implement Safety Features in XGMAC core") > > Signed-off-by: Furong Xu <0x1207@gmail.com> > > --- > > .../ethernet/stmicro/stmmac/dwxgmac2_core.c | 36 +++++++++---------- > > 1 file changed, 18 insertions(+), 18 deletions(-) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > > index eb48211d9b0e..ad812484059e 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c > > @@ -748,29 +748,29 @@ static void dwxgmac3_handle_mac_err(struct net_device *ndev, > > } > > > > static const struct dwxgmac3_error_desc dwxgmac3_mtl_errors[32]= { > > - { true, "TXCES", "MTL TX Memory Error" }, > > + { true, "TXCES", "MTL TX Memory Correctable Error" }, > > { true, "TXAMS", "MTL TX Memory Address Mismatch Error" }, > > - { true, "TXUES", "MTL TX Memory Error" }, > > + { true, "TXUES", "MTL TX Memory Uncorrectable Error" }, > > { false, "UNKNOWN", "Unknown Error" }, /* 3 */ > > - { true, "RXCES", "MTL RX Memory Error" }, > > + { true, "RXCES", "MTL RX Memory Correctable Error" }, > > { true, "RXAMS", "MTL RX Memory Address Mismatch Error" }, > > - { true, "RXUES", "MTL RX Memory Error" }, > > + { true, "RXUES", "MTL RX Memory Uncorrectable Error" }, > > { false, "UNKNOWN", "Unknown Error" }, /* 7 */ > > - { true, "ECES", "MTL EST Memory Error" }, > > + { true, "ECES", "MTL EST Memory Correctable Error" }, > > { true, "EAMS", "MTL EST Memory Address Mismatch Error" }, > > - { true, "EUES", "MTL EST Memory Error" }, > > + { true, "EUES", "MTL EST Memory Uncorrectable Error" }, > > { false, "UNKNOWN", "Unknown Error" }, /* 11 */ > > - { true, "RPCES", "MTL RX Parser Memory Error" }, > > + { true, "RPCES", "MTL RX Parser Memory Correctable Error" }, > > { true, "RPAMS", "MTL RX Parser Memory Address Mismatch Error" }, > > - { true, "RPUES", "MTL RX Parser Memory Error" }, > > + { true, "RPUES", "MTL RX Parser Memory Uncorrectable Error" }, > > { false, "UNKNOWN", "Unknown Error" }, /* 15 */ > > - { false, "UNKNOWN", "Unknown Error" }, /* 16 */ > > - { false, "UNKNOWN", "Unknown Error" }, /* 17 */ > > - { false, "UNKNOWN", "Unknown Error" }, /* 18 */ > > + { true, "SCES", "MTL SGF GCL Memory Correctable Error" }, > > + { true, "SAMS", "MTL SGF GCL Memory Address Mismatch Error" }, > > + { true, "SUES", "MTL SGF GCL Memory Uncorrectable Error" }, > > { false, "UNKNOWN", "Unknown Error" }, /* 19 */ > > - { false, "UNKNOWN", "Unknown Error" }, /* 20 */ > > - { false, "UNKNOWN", "Unknown Error" }, /* 21 */ > > - { false, "UNKNOWN", "Unknown Error" }, /* 22 */ > > + { true, "RXFCES", "MTL RXF Memory Correctable Error" }, > > + { true, "RXFAMS", "MTL RXF Memory Address Mismatch Error" }, > > + { true, "RXFUES", "MTL RXF Memory Uncorrectable Error" }, > > { false, "UNKNOWN", "Unknown Error" }, /* 23 */ > > { false, "UNKNOWN", "Unknown Error" }, /* 24 */ > > { false, "UNKNOWN", "Unknown Error" }, /* 25 */ > > @@ -796,13 +796,13 @@ static void dwxgmac3_handle_mtl_err(struct net_device *ndev, > > } > > > > static const struct dwxgmac3_error_desc dwxgmac3_dma_errors[32]= { > > - { true, "TCES", "DMA TSO Memory Error" }, > > + { true, "TCES", "DMA TSO Memory Correctable Error" }, > > { true, "TAMS", "DMA TSO Memory Address Mismatch Error" }, > > - { true, "TUES", "DMA TSO Memory Error" }, > > + { true, "TUES", "DMA TSO Memory Uncorrectable Error" }, > > { false, "UNKNOWN", "Unknown Error" }, /* 3 */ > > - { true, "DCES", "DMA DCACHE Memory Error" }, > > + { true, "DCES", "DMA DCACHE Memory Correctable Error" }, > > { true, "DAMS", "DMA DCACHE Address Mismatch Error" }, > > - { true, "DUES", "DMA DCACHE Memory Error" }, > > + { true, "DUES", "DMA DCACHE Memory Uncorrectable Error" }, > > { false, "UNKNOWN", "Unknown Error" }, /* 7 */ > > { false, "UNKNOWN", "Unknown Error" }, /* 8 */ > > { false, "UNKNOWN", "Unknown Error" }, /* 9 */ > > -- > > 2.34.1 > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel