aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/aer/aerdrv.h1
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c6
-rw-r--r--drivers/pci/pcie/aer/aerdrv_errprint.c8
3 files changed, 10 insertions, 5 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h
index 0db530db9439..436bf79e2739 100644
--- a/drivers/pci/pcie/aer/aerdrv.h
+++ b/drivers/pci/pcie/aer/aerdrv.h
@@ -61,6 +61,7 @@ struct aer_err_info {
61 u16 id; 61 u16 id;
62 int severity; /* 0:NONFATAL | 1:FATAL | 2:COR */ 62 int severity; /* 0:NONFATAL | 1:FATAL | 2:COR */
63 int flags; 63 int flags;
64 int first;
64 unsigned int status; /* COR/UNCOR Error Status */ 65 unsigned int status; /* COR/UNCOR Error Status */
65 unsigned int mask; /* COR/UNCOR Error Mask */ 66 unsigned int mask; /* COR/UNCOR Error Mask */
66 struct header_log_regs tlp; /* TLP Header */ 67 struct header_log_regs tlp; /* TLP Header */
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 38b3933200ca..9ba1602aebff 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -698,7 +698,7 @@ static struct aer_err_source *get_e_source(struct aer_rpc *rpc)
698 698
699static int get_device_error_info(struct pci_dev *dev, struct aer_err_info *info) 699static int get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
700{ 700{
701 int pos; 701 int pos, temp;
702 702
703 info->status = 0; 703 info->status = 0;
704 info->flags &= ~AER_TLP_HEADER_VALID_FLAG; 704 info->flags &= ~AER_TLP_HEADER_VALID_FLAG;
@@ -727,6 +727,10 @@ static int get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
727 if (!(info->status & ~info->mask)) 727 if (!(info->status & ~info->mask))
728 return AER_UNSUCCESS; 728 return AER_UNSUCCESS;
729 729
730 /* Get First Error Pointer */
731 pci_read_config_dword(dev, pos + PCI_ERR_CAP, &temp);
732 info->first = PCI_ERR_CAP_FEP(temp);
733
730 if (info->status & AER_LOG_TLP_MASKS) { 734 if (info->status & AER_LOG_TLP_MASKS) {
731 info->flags |= AER_TLP_HEADER_VALID_FLAG; 735 info->flags |= AER_TLP_HEADER_VALID_FLAG;
732 pci_read_config_dword(dev, 736 pci_read_config_dword(dev,
diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c
index 41bd1c753ace..0bb91e28d5fe 100644
--- a/drivers/pci/pcie/aer/aerdrv_errprint.c
+++ b/drivers/pci/pcie/aer/aerdrv_errprint.c
@@ -169,11 +169,11 @@ static void aer_print_error_source(struct aer_err_info *info)
169 errmsg = aer_uncorrectable_error_string[i]; 169 errmsg = aer_uncorrectable_error_string[i];
170 170
171 if (errmsg) 171 if (errmsg)
172 AER_PR(info, "%s\t:\n", errmsg); 172 AER_PR(info, "%s\t: %s\n", errmsg,
173 info->first == i ? "First" : "");
173 else 174 else
174 AER_PR(info, "Unknown Error Bit %2d \t:\n", i); 175 AER_PR(info, "Unknown Error Bit %2d \t: %s\n",
175 176 i, info->first == i ? "First" : "");
176 break;
177 } 177 }
178} 178}
179 179