Skip to content

Commit 1291b71

Browse files
committed
PCI/AER: Decode Requester ID when no error info found
When a device with AER detects an error, it logs error information in its own AER Error Status registers. It may send an Error Message to the Root Port (RCEC in the case of an RCiEP), which logs the fact that an Error Message was received (Root Error Status) and the Requester ID of the message source (Error Source Identification). aer_print_port_info() prints the Requester ID from the Root Port Error Source in the usual Linux "bb:dd.f" format, but when find_source_device() finds no error details in the hierarchy below the Root Port, it printed the raw Requester ID without decoding it. Decode the Requester ID in the usual Linux format so it matches other messages. Sample message changes: - pcieport 0000:00:1c.5: AER: Correctable error received: 0000:00:1c.5 - pcieport 0000:00:1c.5: AER: can't find device of ID00e5 + pcieport 0000:00:1c.5: AER: Correctable error message received from 0000:00:1c.5 + pcieport 0000:00:1c.5: AER: found no error details for 0000:00:1c.5 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
1 parent 02a06f5 commit 1291b71

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/pci/pcie/aer.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ static void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info)
740740
u8 bus = info->id >> 8;
741741
u8 devfn = info->id & 0xff;
742742

743-
pci_info(dev, "%s%s error received: %04x:%02x:%02x.%d\n",
743+
pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d\n",
744744
info->multi_error_valid ? "Multiple " : "",
745745
aer_error_severity_string[info->severity],
746746
pci_domain_nr(dev->bus), bus, PCI_SLOT(devfn),
@@ -929,7 +929,12 @@ static bool find_source_device(struct pci_dev *parent,
929929
pci_walk_bus(parent->subordinate, find_device_iter, e_info);
930930

931931
if (!e_info->error_dev_num) {
932-
pci_info(parent, "can't find device of ID%04x\n", e_info->id);
932+
u8 bus = e_info->id >> 8;
933+
u8 devfn = e_info->id & 0xff;
934+
935+
pci_info(parent, "found no error details for %04x:%02x:%02x.%d\n",
936+
pci_domain_nr(parent->bus), bus, PCI_SLOT(devfn),
937+
PCI_FUNC(devfn));
933938
return false;
934939
}
935940
return true;

0 commit comments

Comments
 (0)