From: Keith Busch <keith.busch@intel.com>
To: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
Maik Broemme <mbroemme@libmpq.org>
Cc: Keith Busch <keith.busch@intel.com>
Subject: [PATCH 4/4] PCI/DPC: Print AER status in DPC event handling
Date: Tue, 19 Dec 2017 14:06:43 -0700 [thread overview]
Message-ID: <20171219210643.24615-4-keith.busch@intel.com> (raw)
In-Reply-To: <20171219210643.24615-1-keith.busch@intel.com>
A DPC enabled device will suppress sending ERR_FATAL and ERR_NONFATAL,
which prevents the AER handler from reporting the details of the
error. This patch will have the DPC driver get the AER status registers
from the downstream port that detected the uncorrectable error, and
print out additional information.
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
drivers/pci/pcie/pcie-dpc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index ef71a472592c..aefc4fbdcef0 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -44,6 +44,7 @@ struct dpc_dev {
int cap_pos;
bool rp;
u32 rp_pio_status;
+ struct aer_err_info info;
};
static const char * const rp_pio_error_string[] = {
@@ -111,6 +112,9 @@ static void interrupt_event_handler(struct work_struct *work)
struct pci_dev *dev, *temp, *pdev = dpc->dev->port;
struct pci_bus *parent = pdev->subordinate;
+ if (aer_get_device_error_info(pdev, &dpc->info))
+ aer_print_error(pdev, &dpc->info);
+
pci_lock_rescan_remove();
list_for_each_entry_safe_reverse(dev, temp, &parent->devices,
bus_list) {
@@ -275,6 +279,10 @@ static irqreturn_t dpc_irq(int irq, void *context)
/* show RP PIO error detail information */
if (reason == 3 && ext_reason == 0)
dpc_process_rp_pio_error(dpc);
+ if (reason == 2)
+ dpc->info.severity = AER_FATAL;
+ else
+ dpc->info.severity = AER_NONFATAL;
schedule_work(&dpc->work);
}
--
2.13.6
next prev parent reply other threads:[~2017-12-19 21:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 21:06 [PATCH 1/4] PCI/AER: Return approrpiate value when AER is not supported Keith Busch
2017-12-19 21:06 ` [PATCH 2/4] PCI/AER: Provide API for getting AER information Keith Busch
2017-12-19 21:06 ` [PATCH 3/4] PCI/DPC: Enable DPC in conjuction with AER Keith Busch
2018-01-15 14:43 ` Sinan Kaya
2018-01-16 1:33 ` Keith Busch
2018-01-16 3:04 ` Sinan Kaya
2017-12-19 21:06 ` Keith Busch [this message]
2017-12-21 4:43 ` [PATCH 4/4] PCI/DPC: Print AER status in DPC event handling Sinan Kaya
2017-12-21 5:12 ` Keith Busch
2018-01-10 15:52 ` Sinan Kaya
2018-01-16 2:47 ` Keith Busch
2018-01-17 0:56 ` Bjorn Helgaas
2018-01-17 1:34 ` Keith Busch
2018-01-17 13:36 ` Sinan Kaya
2018-01-12 23:03 ` Bjorn Helgaas
2018-01-14 1:35 ` Keith Busch
2018-01-15 14:32 ` Sinan Kaya
2018-01-17 0:36 ` Bjorn Helgaas
2018-01-17 0:14 ` Bjorn Helgaas
2017-12-21 1:04 ` [PATCH 1/4] PCI/AER: Return approrpiate value when AER is not supported Bjorn Helgaas
2017-12-21 3:53 ` Dongdong Liu
2017-12-21 14:59 ` Keith Busch
2018-03-20 23:02 ` Bjorn Helgaas
2018-03-21 22:27 ` Keith Busch
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=20171219210643.24615-4-keith.busch@intel.com \
--to=keith.busch@intel.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=mbroemme@libmpq.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox