[PATCH for-next 4/5] IB/Hfi1: Mask Unsupported Request error bit in PCIe AER

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

 



From: Kamenee Arumugam <kamenee.arumugam@xxxxxxxxx>

For Hfi1, this unsupported request error is not considered a fatal
error. Set Unsupported Request Error bit in Uncorrectable Error Mask
register to disable error reporting to the PCIe root complex.

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>
Signed-off-by: Kamenee Arumugam <kamenee.arumugam@xxxxxxxxx>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
---
 drivers/infiniband/hw/hfi1/pcie.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hfi1/pcie.c
index 87bd6b6..332c843 100644
--- a/drivers/infiniband/hw/hfi1/pcie.c
+++ b/drivers/infiniband/hw/hfi1/pcie.c
@@ -79,6 +79,8 @@
 int hfi1_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	int ret;
+	int aer;
+	u32 data;
 
 	ret = pci_enable_device(pdev);
 	if (ret) {
@@ -130,6 +132,19 @@ int hfi1_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent)
 	}
 
 	pci_set_master(pdev);
+
+	aer = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR);
+	if (!aer)
+		goto done;
+	pci_read_config_dword(pdev, aer + PCI_ERR_UNCOR_MASK, &data);
+	if (!(data & PCI_ERR_UNC_UNSUP)) {
+		data |= PCI_ERR_UNC_UNSUP;
+		if (!pci_write_config_dword(pdev, aer + PCI_ERR_UNCOR_MASK,
+					    data))
+			hfi1_early_err(&pdev->dev,
+				       "Masking Unsupported Request error\n");
+	}
+
 	(void)pci_enable_pcie_error_reporting(pdev);
 	goto done;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux