aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/pcie/aer/aerdrv_errprint.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c
index 48f70fa7f684..a2a4b3903a7a 100644
--- a/drivers/pci/pcie/aer/aerdrv_errprint.c
+++ b/drivers/pci/pcie/aer/aerdrv_errprint.c
@@ -185,6 +185,7 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
185{ 185{
186 char *errmsg; 186 char *errmsg;
187 int err_layer, agent; 187 int err_layer, agent;
188 int id = ((dev->bus->number << 8) | dev->devfn);
188 189
189 AER_PR(info, "+------ PCI-Express Device Error ------+\n"); 190 AER_PR(info, "+------ PCI-Express Device Error ------+\n");
190 AER_PR(info, "Error Severity\t\t: %s\n", 191 AER_PR(info, "Error Severity\t\t: %s\n",
@@ -192,11 +193,7 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
192 193
193 if (info->status == 0) { 194 if (info->status == 0) {
194 AER_PR(info, "PCIE Bus Error type\t: (Unaccessible)\n"); 195 AER_PR(info, "PCIE Bus Error type\t: (Unaccessible)\n");
195 AER_PR(info, "Unaccessible Received\t: %s\n", 196 AER_PR(info, "Unregistered Agent ID\t: %04x\n", id);
196 info->flags & AER_MULTI_ERROR_VALID_FLAG ?
197 "Multiple" : "First");
198 AER_PR(info, "Unregistered Agent ID\t: %04x\n",
199 (dev->bus->number << 8) | dev->devfn);
200 } else { 197 } else {
201 err_layer = AER_GET_LAYER_ERROR(info->severity, info->status); 198 err_layer = AER_GET_LAYER_ERROR(info->severity, info->status);
202 AER_PR(info, "PCIE Bus Error type\t: %s\n", 199 AER_PR(info, "PCIE Bus Error type\t: %s\n",
@@ -206,15 +203,11 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
206 errmsg = aer_get_error_source_name(info->severity, 203 errmsg = aer_get_error_source_name(info->severity,
207 info->status, 204 info->status,
208 errmsg_buff); 205 errmsg_buff);
209 AER_PR(info, "%s\t: %s\n", errmsg, 206 AER_PR(info, "%s\t:\n", errmsg);
210 info->flags & AER_MULTI_ERROR_VALID_FLAG ?
211 "Multiple" : "First");
212 spin_unlock(&logbuf_lock); 207 spin_unlock(&logbuf_lock);
213 208
214 agent = AER_GET_AGENT(info->severity, info->status); 209 agent = AER_GET_AGENT(info->severity, info->status);
215 AER_PR(info, "%s\t\t: %04x\n", 210 AER_PR(info, "%s\t\t: %04x\n", aer_agent_string[agent], id);
216 aer_agent_string[agent],
217 (dev->bus->number << 8) | dev->devfn);
218 211
219 AER_PR(info, "VendorID=%04xh, DeviceID=%04xh," 212 AER_PR(info, "VendorID=%04xh, DeviceID=%04xh,"
220 " Bus=%02xh, Device=%02xh, Function=%02xh\n", 213 " Bus=%02xh, Device=%02xh, Function=%02xh\n",
@@ -236,4 +229,8 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
236 *(tlp + 13), *(tlp + 12)); 229 *(tlp + 13), *(tlp + 12));
237 } 230 }
238 } 231 }
232
233 if (info->id && info->error_dev_num > 1 && info->id == id)
234 AER_PR(info, "Error of this Agent(%04x) is reported first\n",
235 id);
239} 236}