From: Zhenzhong Duan <zhenzhong.duan@intel.com> To: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org Cc: rafael@kernel.org, lenb@kernel.org, james.morse@arm.com, tony.luck@intel.com, bp@alien8.de, dave@stgolabs.net, jonathan.cameron@huawei.com, dave.jiang@intel.com, alison.schofield@intel.com, vishal.l.verma@intel.com, ira.weiny@intel.com, bhelgaas@google.com, helgaas@kernel.org, mahesh@linux.ibm.com, oohall@gmail.com, linmiaohe@huawei.com, shiju.jose@huawei.com, adam.c.preble@intel.com, leoyang.li@nxp.com, lukas@wunner.de, Smita.KoralahalliChannabasappa@amd.com, rrichter@amd.com, linux-cxl@vger.kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, erwin.tsaur@intel.com, sathyanarayanan.kuppuswamy@intel.com, dan.j.williams@intel.com, feiting.wanyan@intel.com, yudong.wang@intel.com, chao.p.peng@intel.com, qingshun.wang@linux.intel.com, Zhenzhong Duan <zhenzhong.duan@intel.com> Subject: [PATCH v3 2/3] PCI/AER: Print UNCOR_STATUS bits that might be ANFE Date: Wed, 17 Apr 2024 14:14:06 +0800 [thread overview] Message-ID: <20240417061407.1491361-3-zhenzhong.duan@intel.com> (raw) In-Reply-To: <20240417061407.1491361-1-zhenzhong.duan@intel.com> When an Advisory Non-Fatal error(ANFE) triggers, both correctable error(CE) status and ANFE related uncorrectable error(UE) status will be printed: AER: Correctable error message received from 0000:b7:02.0 PCIe Bus Error: severity=Correctable, type=Transaction Layer, (Receiver ID) device [8086:0db0] error status/mask=00002000/00000000 [13] NonFatalErr Uncorrectable errors that may cause Advisory Non-Fatal: [18] TLP Tested-by: Yudong Wang <yudong.wang@intel.com> Co-developed-by: "Wang, Qingshun" <qingshun.wang@linux.intel.com> Signed-off-by: "Wang, Qingshun" <qingshun.wang@linux.intel.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> --- drivers/pci/pcie/aer.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 27364ab4b148..870e1d1a5159 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -681,6 +681,7 @@ static void __aer_print_error(struct pci_dev *dev, { const char **strings; unsigned long status = info->status & ~info->mask; + unsigned long anfe_status = info->anfe_status; const char *level, *errmsg; int i; @@ -701,6 +702,20 @@ static void __aer_print_error(struct pci_dev *dev, info->first_error == i ? " (First)" : ""); } pci_dev_aer_stats_incr(dev, info); + + if (!anfe_status) + return; + + strings = aer_uncorrectable_error_string; + pci_printk(level, dev, "Uncorrectable errors that may cause Advisory Non-Fatal:\n"); + + for_each_set_bit(i, &anfe_status, 32) { + errmsg = strings[i]; + if (!errmsg) + errmsg = "Unknown Error Bit"; + + pci_printk(level, dev, " [%2d] %s\n", i, errmsg); + } } void aer_print_error(struct pci_dev *dev, struct aer_err_info *info) -- 2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Zhenzhong Duan <zhenzhong.duan@intel.com> To: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org Cc: linmiaohe@huawei.com, alison.schofield@intel.com, rafael@kernel.org, sathyanarayanan.kuppuswamy@intel.com, erwin.tsaur@intel.com, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, oohall@gmail.com, ira.weiny@intel.com, dave@stgolabs.net, dave.jiang@intel.com, vishal.l.verma@intel.com, Smita.KoralahalliChannabasappa@amd.com, helgaas@kernel.org, lenb@kernel.org, chao.p.peng@intel.com, rrichter@amd.com, yudong.wang@intel.com, bp@alien8.de, qingshun.wang@linux.intel.com, jonathan.cameron@huawei.com, bhelgaas@google.com, dan.j.williams@intel.com, Zhenzhong Duan <zhenzhong.duan@intel.com>, linux-edac@vger.kernel.org, tony.luck@intel.com, feiting.wanyan@intel.com, adam.c.preble@intel.com, mahesh@linux.ibm.com, leoyang.li@nxp.com, lukas@wunner.de, james.morse@arm.com, shiju.jose@huawei.com Subject: [PATCH v3 2/3] PCI/AER: Print UNCOR_STATUS bits that might be ANFE Date: Wed, 17 Apr 2024 14:14:06 +0800 [thread overview] Message-ID: <20240417061407.1491361-3-zhenzhong.duan@intel.com> (raw) In-Reply-To: <20240417061407.1491361-1-zhenzhong.duan@intel.com> When an Advisory Non-Fatal error(ANFE) triggers, both correctable error(CE) status and ANFE related uncorrectable error(UE) status will be printed: AER: Correctable error message received from 0000:b7:02.0 PCIe Bus Error: severity=Correctable, type=Transaction Layer, (Receiver ID) device [8086:0db0] error status/mask=00002000/00000000 [13] NonFatalErr Uncorrectable errors that may cause Advisory Non-Fatal: [18] TLP Tested-by: Yudong Wang <yudong.wang@intel.com> Co-developed-by: "Wang, Qingshun" <qingshun.wang@linux.intel.com> Signed-off-by: "Wang, Qingshun" <qingshun.wang@linux.intel.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> --- drivers/pci/pcie/aer.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 27364ab4b148..870e1d1a5159 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -681,6 +681,7 @@ static void __aer_print_error(struct pci_dev *dev, { const char **strings; unsigned long status = info->status & ~info->mask; + unsigned long anfe_status = info->anfe_status; const char *level, *errmsg; int i; @@ -701,6 +702,20 @@ static void __aer_print_error(struct pci_dev *dev, info->first_error == i ? " (First)" : ""); } pci_dev_aer_stats_incr(dev, info); + + if (!anfe_status) + return; + + strings = aer_uncorrectable_error_string; + pci_printk(level, dev, "Uncorrectable errors that may cause Advisory Non-Fatal:\n"); + + for_each_set_bit(i, &anfe_status, 32) { + errmsg = strings[i]; + if (!errmsg) + errmsg = "Unknown Error Bit"; + + pci_printk(level, dev, " [%2d] %s\n", i, errmsg); + } } void aer_print_error(struct pci_dev *dev, struct aer_err_info *info) -- 2.34.1
next prev parent reply other threads:[~2024-04-17 6:17 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-17 6:14 [PATCH v3 0/3] PCI/AER: Handle Advisory Non-Fatal error Zhenzhong Duan 2024-04-17 6:14 ` Zhenzhong Duan 2024-04-17 6:14 ` [PATCH v3 1/3] PCI/AER: Store UNCOR_STATUS bits that might be ANFE in aer_err_info Zhenzhong Duan 2024-04-17 6:14 ` Zhenzhong Duan 2024-04-22 16:16 ` Jonathan Cameron 2024-04-22 16:16 ` Jonathan Cameron 2024-04-23 2:25 ` Duan, Zhenzhong 2024-04-23 2:25 ` Duan, Zhenzhong 2024-04-26 16:11 ` Jonathan Cameron 2024-04-26 16:11 ` Jonathan Cameron 2024-04-28 3:31 ` Duan, Zhenzhong 2024-04-28 3:31 ` Duan, Zhenzhong 2024-05-01 12:24 ` Jonathan Cameron 2024-05-01 12:24 ` Jonathan Cameron 2024-05-03 11:10 ` Duan, Zhenzhong 2024-05-03 11:10 ` Duan, Zhenzhong 2024-04-17 6:14 ` Zhenzhong Duan [this message] 2024-04-17 6:14 ` [PATCH v3 2/3] PCI/AER: Print UNCOR_STATUS bits that might be ANFE Zhenzhong Duan 2024-04-17 6:14 ` [PATCH v3 3/3] PCI/AER: Clear " Zhenzhong Duan 2024-04-17 6:14 ` Zhenzhong Duan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240417061407.1491361-3-zhenzhong.duan@intel.com \ --to=zhenzhong.duan@intel.com \ --cc=Smita.KoralahalliChannabasappa@amd.com \ --cc=adam.c.preble@intel.com \ --cc=alison.schofield@intel.com \ --cc=bhelgaas@google.com \ --cc=bp@alien8.de \ --cc=chao.p.peng@intel.com \ --cc=dan.j.williams@intel.com \ --cc=dave.jiang@intel.com \ --cc=dave@stgolabs.net \ --cc=erwin.tsaur@intel.com \ --cc=feiting.wanyan@intel.com \ --cc=helgaas@kernel.org \ --cc=ira.weiny@intel.com \ --cc=james.morse@arm.com \ --cc=jonathan.cameron@huawei.com \ --cc=lenb@kernel.org \ --cc=leoyang.li@nxp.com \ --cc=linmiaohe@huawei.com \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-cxl@vger.kernel.org \ --cc=linux-edac@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=lukas@wunner.de \ --cc=mahesh@linux.ibm.com \ --cc=oohall@gmail.com \ --cc=qingshun.wang@linux.intel.com \ --cc=rafael@kernel.org \ --cc=rrichter@amd.com \ --cc=sathyanarayanan.kuppuswamy@intel.com \ --cc=shiju.jose@huawei.com \ --cc=tony.luck@intel.com \ --cc=vishal.l.verma@intel.com \ --cc=yudong.wang@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.