--- v1
+++ v4
@@ -19,7 +19,6 @@
Related Bug Report:
https://lore.kernel.org/linux-pci/20151229155822.GA17321@localhost/
- https://bugzilla.kernel.org/show_bug.cgi?id=109691
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1521173
The above bug could be avoided, if the AER registers are cleared during
@@ -35,8 +34,8 @@
Signed-off-by: Naveen Naidu <naveennaidu479@gmail.com>
---
drivers/pci/pci.h | 13 ++-
- drivers/pci/pcie/aer.c | 245 ++++++++++++++++++++++++++++-------------
- 2 files changed, 182 insertions(+), 76 deletions(-)
+ drivers/pci/pcie/aer.c | 249 ++++++++++++++++++++++++++++-------------
+ 2 files changed, 184 insertions(+), 78 deletions(-)
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 9be7a966fda7..eb88d8bfeaf7 100644
@@ -70,7 +69,7 @@
void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
#endif /* CONFIG_PCIEAER */
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
-index 241ff361b43c..91f91d6ab052 100644
+index 241ff361b43c..d3937f5384e4 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -36,6 +36,18 @@
@@ -101,8 +100,12 @@
};
/* AER stats for the device */
-@@ -806,11 +818,11 @@ void cper_print_aer(struct pci_dev *dev, int aer_severity,
- * @e_info: pointer to error info
+@@ -803,14 +815,14 @@ void cper_print_aer(struct pci_dev *dev, int aer_severity,
+
+ /**
+ * add_error_device - list device to be handled
+- * @e_info: pointer to error info
++ * @e_dev: pointer to error info
* @dev: pointer to pci_dev to be added
*/
-static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev)
@@ -140,6 +143,15 @@
return 1;
}
return 0;
+@@ -897,7 +909,7 @@ static int find_device_iter(struct pci_dev *dev, void *data)
+ /**
+ * find_source_device - search through device hierarchy for source device
+ * @parent: pointer to Root Port pci_dev data structure
+- * @e_info: including detailed error information such like id
++ * @e_dev: including detailed error information such like id
+ *
+ * Return true if found.
+ *
@@ -907,26 +919,26 @@ static int find_device_iter(struct pci_dev *dev, void *data)
* e_info->error_dev_num and e_info->dev[], based on the given information.
*/
@@ -299,7 +311,7 @@
+}
+/**
-+ * aer_find_corr_error_source_device - find the error source which detected the uncorrected error
++ * aer_find_uncorr_error_source_device - find the error source which detected the uncorrected error
+ * @rp: pointer to Root Port pci_dev data structure
+ * @e_src: pointer to an error source
+ * @e_info: including detailed error information such like id