Commit f04e5285 authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'pci/aer'

- Log AER errors as "Correctable" (not "Corrected") or "Uncorrectable" to
  match spec terminology (Bjorn Helgaas)

- Decode Requester ID when no error info found instead of printing the raw
  hex value (Bjorn Helgaas)

* pci/aer:
  PCI/AER: Use explicit register sizes for struct members
  PCI/AER: Decode Requester ID when no error info found
  PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors
parents b85ea95d db02e176
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
#define AER_MAX_TYPEOF_UNCOR_ERRS 27 /* as per PCI_ERR_UNCOR_STATUS*/ #define AER_MAX_TYPEOF_UNCOR_ERRS 27 /* as per PCI_ERR_UNCOR_STATUS*/
struct aer_err_source { struct aer_err_source {
unsigned int status; u32 status; /* PCI_ERR_ROOT_STATUS */
unsigned int id; u32 id; /* PCI_ERR_ROOT_ERR_SRC */
}; };
struct aer_rpc { struct aer_rpc {
...@@ -435,10 +435,10 @@ void pci_aer_exit(struct pci_dev *dev) ...@@ -435,10 +435,10 @@ void pci_aer_exit(struct pci_dev *dev)
/* /*
* AER error strings * AER error strings
*/ */
static const char *aer_error_severity_string[] = { static const char * const aer_error_severity_string[] = {
"Uncorrected (Non-Fatal)", "Uncorrectable (Non-Fatal)",
"Uncorrected (Fatal)", "Uncorrectable (Fatal)",
"Corrected" "Correctable"
}; };
static const char *aer_error_layer[] = { static const char *aer_error_layer[] = {
...@@ -740,7 +740,7 @@ static void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info) ...@@ -740,7 +740,7 @@ static void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info)
u8 bus = info->id >> 8; u8 bus = info->id >> 8;
u8 devfn = info->id & 0xff; u8 devfn = info->id & 0xff;
pci_info(dev, "%s%s error received: %04x:%02x:%02x.%d\n", pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d\n",
info->multi_error_valid ? "Multiple " : "", info->multi_error_valid ? "Multiple " : "",
aer_error_severity_string[info->severity], aer_error_severity_string[info->severity],
pci_domain_nr(dev->bus), bus, PCI_SLOT(devfn), pci_domain_nr(dev->bus), bus, PCI_SLOT(devfn),
...@@ -929,7 +929,12 @@ static bool find_source_device(struct pci_dev *parent, ...@@ -929,7 +929,12 @@ static bool find_source_device(struct pci_dev *parent,
pci_walk_bus(parent->subordinate, find_device_iter, e_info); pci_walk_bus(parent->subordinate, find_device_iter, e_info);
if (!e_info->error_dev_num) { if (!e_info->error_dev_num) {
pci_info(parent, "can't find device of ID%04x\n", e_info->id); u8 bus = e_info->id >> 8;
u8 devfn = e_info->id & 0xff;
pci_info(parent, "found no error details for %04x:%02x:%02x.%d\n",
pci_domain_nr(parent->bus), bus, PCI_SLOT(devfn),
PCI_FUNC(devfn));
return false; return false;
} }
return true; return true;
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
struct pci_dev; struct pci_dev;
struct aer_header_log_regs { struct aer_header_log_regs {
unsigned int dw0; u32 dw0;
unsigned int dw1; u32 dw1;
unsigned int dw2; u32 dw2;
unsigned int dw3; u32 dw3;
}; };
struct aer_capability_regs { struct aer_capability_regs {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment