From: Sudarsana Reddy Kalluru Date: Wed, 22 Apr 2020 13:16:06 +0000 (-0700) Subject: qed: Enable device error reporting capability. X-Git-Tag: v5.10.7~2469^2~447^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2196d831205bad6bc5cd328baf0ae02234629695;p=platform%2Fkernel%2Flinux-rpi.git qed: Enable device error reporting capability. The patch enables the device to send error messages to root port when an error is detected. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c index 96356e89..38a1d26 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_main.c +++ b/drivers/net/ethernet/qlogic/qed/qed_main.c @@ -49,6 +49,7 @@ #include #include #include +#include #include "qed.h" #include "qed_sriov.h" @@ -129,6 +130,8 @@ static void qed_free_pci(struct qed_dev *cdev) { struct pci_dev *pdev = cdev->pdev; + pci_disable_pcie_error_reporting(pdev); + if (cdev->doorbells && cdev->db_size) iounmap(cdev->doorbells); if (cdev->regview) @@ -231,6 +234,12 @@ static int qed_init_pci(struct qed_dev *cdev, struct pci_dev *pdev) return -ENOMEM; } + /* AER (Advanced Error reporting) configuration */ + rc = pci_enable_pcie_error_reporting(pdev); + if (rc) + DP_VERBOSE(cdev, NETIF_MSG_DRV, + "Failed to configure PCIe AER [%d]\n", rc); + return 0; err2: