[PATCH v2 2/2] PCI/AER: Enable AER on Endpoints as well

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently, the PCIe AER subsystem does not enable AER in the PCIe
Endpoints via the Device Control register. It's only done for the
Root Port and all PCIe Ports in between the Root Port and the
Endpoint(s). Some device drivers enable AER in their PCIe device by
directly calling pci_enable_pcie_error_reporting(). But in most
cases, AER is currently disabled in the PCIe Endpoints.

This patch enables AER on PCIe Endpoints now as well in
set_device_error_reporting(). This will make the ad-hoc calls to
pci_enable_pcie_error_reporting() superfluous.

Signed-off-by: Stefan Roese <sr@xxxxxxx>
Cc: Bjorn Helgaas <helgaas@xxxxxxxxxx>
Cc: Pali Rohár <pali@xxxxxxxxxx>
Cc: Bharat Kumar Gogada <bharat.kumar.gogada@xxxxxxxxxx>
Cc: Michal Simek <michal.simek@xxxxxxxxxx>
Cc: Yao Hongbo <yaohongbo@xxxxxxxxxxxxxxxxx>
Cc: Naveen Naidu <naveennaidu479@xxxxxxxxx>
---
v2:
- New patch

 drivers/pci/pcie/aer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 9fa1f97e5b27..385e2033d7b5 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -1216,7 +1216,8 @@ static int set_device_error_reporting(struct pci_dev *dev, void *data)
 	if ((type == PCI_EXP_TYPE_ROOT_PORT) ||
 	    (type == PCI_EXP_TYPE_RC_EC) ||
 	    (type == PCI_EXP_TYPE_UPSTREAM) ||
-	    (type == PCI_EXP_TYPE_DOWNSTREAM)) {
+	    (type == PCI_EXP_TYPE_DOWNSTREAM) ||
+	    (type == PCI_EXP_TYPE_ENDPOINT)) {
 		if (enable)
 			pci_enable_pcie_error_reporting(dev);
 		else
-- 
2.34.1




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux