[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201002184735.1229220-15-seanvk.dev@oregontracks.org>
Date: Fri, 2 Oct 2020 11:47:35 -0700
From: Sean V Kelley <seanvk.dev@...gontracks.org>
To: bhelgaas@...gle.com, Jonathan.Cameron@...wei.com,
rafael.j.wysocki@...el.com, ashok.raj@...el.com,
tony.luck@...el.com, sathyanarayanan.kuppuswamy@...el.com,
qiuxu.zhuo@...el.com
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Sean V Kelley <sean.v.kelley@...el.com>
Subject: [PATCH v8 14/14] PCI/AER: Add RCEC AER error injection support
From: Qiuxu Zhuo <qiuxu.zhuo@...el.com>
The Root Complex Event Collectors (RCEC) appear as peers to Root Ports
and also have the AER capability. So add RCEC support to the current AER
error injection driver.
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@...el.com>
Co-developed-by: Sean V Kelley <sean.v.kelley@...el.com>
Signed-off-by: Sean V Kelley <sean.v.kelley@...el.com>
---
drivers/pci/pcie/aer_inject.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/pcie/aer_inject.c b/drivers/pci/pcie/aer_inject.c
index c2cbf425afc5..011a6c54b4e3 100644
--- a/drivers/pci/pcie/aer_inject.c
+++ b/drivers/pci/pcie/aer_inject.c
@@ -333,8 +333,11 @@ static int aer_inject(struct aer_error_inj *einj)
if (!dev)
return -ENODEV;
rpdev = pcie_find_root_port(dev);
+ /* If Root port not found, try to find an RCEC */
+ if (!rpdev)
+ rpdev = dev->rcec;
if (!rpdev) {
- pci_err(dev, "Root port not found\n");
+ pci_err(dev, "Neither root port nor RCEC found\n");
ret = -ENODEV;
goto out_put;
}
--
2.28.0
Powered by blists - more mailing lists