From patchwork Tue Jan 23 08:50:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Furong Xu <0x1207@gmail.com> X-Patchwork-Id: 13526996 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 EC1A8C47258 for ; Tue, 23 Jan 2024 08:52:19 +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:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=pDf1Zh8CbDtRTYdWF15h6iOzf7E8KeQJ9J9mItpaLEs=; b=Ub2gPEi4+mQMVy +XA+BDQ/9rRSvW/+gEdmdb8l1zFvtGyl9YoH7ppkTiROPYL8aNBhTUrvIwTpxz3akDrIW1P1t/peV QOVFUXpC99dXYvDKgZXbpxaWWO/vjbb4+ebkwSDm/cHhXcAl2nlwEf15lqBzGgk4A67zRSbsmb+vK G23h2maetPK0Ut1bO1Aog19q4Vi7EjmIqvf4s+rOgkRmstJQGc2Toz03mq55m5VXgqA7BMpV5NfjL SP4XodDvKqUvlOD9X21NLOoHTNYd6Te9ous3MYQzXWyietmL7KOZlq0Dgz784LluFYUKflmeWLGzv ufG4kxeGrIX/hCiTOazw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSCVc-00Fduj-2E; Tue, 23 Jan 2024 08:51:52 +0000 Received: from mail-ot1-f49.google.com ([209.85.210.49]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSCVa-00Fdsv-1A for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 08:51:51 +0000 Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-6de83f5a004so2792385a34.1 for ; Tue, 23 Jan 2024 00:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705999848; x=1706604648; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FNB6nZlr/06kPBlEqaF8a61wrkKCAoA4BnsL6cXaDrQ=; b=ezk61YIVCQg9DyooeU97uBhE516N829/gnNhy2I62KX96LuRTfd4571Jhg+6U5XMmS qwFGEAXaslGguGNcUpof1eZXsXIfU+oOamnfIYp6tyS+DEnnH2zc9uoghTdW4TLMrXmK q89Oq6tyiS8sAVTcYtM3Zyjnc4oCDXpQ4I6K/8Ze9hJDQUOHh9EyvvL8zfFVtp6HnrID gxgye5LBXJhaIvvD+JXw0zbMiAePS9/obwBmmRHvPZHTuLD7/NULMtuWdOX5SKwMKfwn P8+YWdeiD7r7Zizgll4X2qWHyaosCqeKaDc99Y4ySpKpoLmJdPYGNaZIRRqpdBPnrfyO +HxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705999848; x=1706604648; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FNB6nZlr/06kPBlEqaF8a61wrkKCAoA4BnsL6cXaDrQ=; b=eCEbf4apt0OcnvW7E37OhuDsW7/PXV2jU7v1jUWzmKfXN4VOYIqxQ5p4quR7cP3+oM 4UV9Jr4iVBL2IkYYXugzCWnX9qrvNGXE0MZfd5CIMGPHIbAU/X1HxkyCXtjY1XQdB2bm NTtTgPdJohMtPKglu0B1iQ+SUd8NeS0MUpJ2pbnYGZ4paMaGF5undXUD9Idjnl4/p0z/ gOM3N1LVYHEO5D2LgYZ4x6Yob8puAg3gquAmDSqXfOpikoDLtAJXacBJoWJwi2tS8T47 1bXERmBsFFnxR/vpH8jrswChyqjv/LOxtoTwddIv3jFXibzi1DlXVoKmDm65Lo2nX48y lE8g== X-Gm-Message-State: AOJu0YwroTVIDwEv8cm30w7g/ybgyFiZwX7UcU6Vtnq6sDHYOeOR+PES ZrYmSYxaycciFl4A7yFIJBpcm8QQHWHOH5eFquRltH7Dp/wK0w4x X-Google-Smtp-Source: AGHT+IHRKZzHqJsuxlpfoRfWi87C1N58CDPLVDywt+3AVD3QL8TKT2ebBbKukW0im0MhyVmjRuztlw== X-Received: by 2002:a05:6830:1e2d:b0:6dc:8dfb:3a86 with SMTP id t13-20020a0568301e2d00b006dc8dfb3a86mr5969046otr.15.1705999847791; Tue, 23 Jan 2024 00:50:47 -0800 (PST) Received: from localhost.localdomain ([112.65.140.130]) by smtp.googlemail.com with ESMTPSA id w70-20020a638249000000b005cf88b016cesm9626322pgd.72.2024.01.23.00.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 00:50:47 -0800 (PST) From: Furong Xu <0x1207@gmail.com> To: "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto , Simon Horman Cc: 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, Furong Xu <0x1207@gmail.com> Subject: [PATCH net] net: stmmac: xgmac: fix safety error descriptions Date: Tue, 23 Jan 2024 16:50:37 +0800 Message-Id: <20240123085037.939471-1-0x1207@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_005150_397327_54137763 X-CRM114-Status: GOOD ( 12.44 ) 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 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. Fixes: 56e58d6c8a56 ("net: stmmac: Implement Safety Features in XGMAC core") Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Simon Horman --- .../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 */