qed*: Add support for pcie advanced error recovery.
Subsystems (3)
v2 cover qed*: Add support for pcie advanced error recovery.
The patch series adds qed/qede driver changes for PCIe Advanced Error Recovery (AER) support.
Patch (1) adds qed changes to enable the device to send error messages to root port when detected.
Patch (2) adds qede support for handling the detected errors (AERs).
Changes from previous version:
-------------------------------
v2: use pci_num_vf() instead of caching the value in edev.
Please consider applying this to "net-next".
Sudarsana Reddy Kalluru (2):
qed: Enable device error reporting capability.
qede: Add support for handling the pcie errors.
drivers/net/ethernet/qlogic/qed/qed_main.c | 9 ++++ drivers/net/ethernet/qlogic/qede/qede.h | 1 + drivers/net/ethernet/qlogic/qede/qede_main.c | 68 +++++++++++++++++++++++++++- 3 files changed, 77 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.1
PATCH v2 1/2 qed: Enable device error reporting capability.
The patch enables the device to send error messages to root port when an error is detected.
--- drivers/net/ethernet/qlogic/qed/qed_main.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/ethernet/qlogic/qed/qed_main.c +9 -0
@@ -49,6 +49,7 @@#include <linux/qed/qed_if.h> #include <linux/qed/qed_ll2_if.h> #include <net/devlink.h> +#include <linux/aer.h> #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:
Signature · 1 line
1.8.3.1
PATCH v2 2/2 qede: Add support for handling the pcie errors.
In reply to Sudarsana Reddy KalluruThe error recovery is handled by management firmware (MFW) with the help of qed/qede drivers. Upon detecting the errors, driver informs MFW about this event which in turn starts a recovery process. MFW sends ERROR_RECOVERY notification to the driver which performs the required cleanup/recovery from the driver side.
--- drivers/net/ethernet/qlogic/qede/qede.h | 1 + drivers/net/ethernet/qlogic/qede/qede_main.c | 68 +++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qede/qede.h +1 -0
@@ -485,6 +485,7 @@ struct qede_fastpath {#define QEDE_SP_RECOVERY 0#define QEDE_SP_RX_MODE 1 +#define QEDE_SP_AER 7#ifdef CONFIG_RFS_ACCEL int qede_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
drivers/net/ethernet/qlogic/qede/qede_main.c +67 -1
107 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Re: [PATCH net-next v2 2/2] qede: Add support for handling the pcie errors.
Quoted 7 lines · On Wed, 22 Apr 2020 06:16:07 -0700 Sudarsana Reddy Kalluru wrote:
The error recovery is handled by management firmware (MFW) with the help of qed/qede drivers. Upon detecting the errors, driver informs MFW about this event which in turn starts a recovery process. MFW sends
ERROR_RECOVERYnotification to the driver which performs the required cleanup/recovery from the driver side.Signed-off-by Sudarsana Reddy Kalluru <[email protected]>