Commit 1a303d88 authored by Oliver O'Halloran's avatar Oliver O'Halloran Committed by Michael Ellerman

powerpc/eeh: Remove spurious use of pci_dn in eeh_dump_dev_log

Retrieve the domain, bus, device, and function numbers from the edev.
Signed-off-by: default avatarOliver O'Halloran <oohall@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200725081231.39076-10-oohall@gmail.com
parent 17d2a487
...@@ -167,23 +167,17 @@ void eeh_show_enabled(void) ...@@ -167,23 +167,17 @@ void eeh_show_enabled(void)
*/ */
static size_t eeh_dump_dev_log(struct eeh_dev *edev, char *buf, size_t len) static size_t eeh_dump_dev_log(struct eeh_dev *edev, char *buf, size_t len)
{ {
struct pci_dn *pdn = eeh_dev_to_pdn(edev);
u32 cfg; u32 cfg;
int cap, i; int cap, i;
int n = 0, l = 0; int n = 0, l = 0;
char buffer[128]; char buffer[128];
if (!pdn) {
pr_warn("EEH: Note: No error log for absent device.\n");
return 0;
}
n += scnprintf(buf+n, len-n, "%04x:%02x:%02x.%01x\n", n += scnprintf(buf+n, len-n, "%04x:%02x:%02x.%01x\n",
pdn->phb->global_number, pdn->busno, edev->pe->phb->global_number, edev->bdfn >> 8,
PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); PCI_SLOT(edev->bdfn), PCI_FUNC(edev->bdfn));
pr_warn("EEH: of node=%04x:%02x:%02x.%01x\n", pr_warn("EEH: of node=%04x:%02x:%02x.%01x\n",
pdn->phb->global_number, pdn->busno, edev->pe->phb->global_number, edev->bdfn >> 8,
PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); PCI_SLOT(edev->bdfn), PCI_FUNC(edev->bdfn));
eeh_ops->read_config(edev, PCI_VENDOR_ID, 4, &cfg); eeh_ops->read_config(edev, PCI_VENDOR_ID, 4, &cfg);
n += scnprintf(buf+n, len-n, "dev/vend:%08x\n", cfg); n += scnprintf(buf+n, len-n, "dev/vend:%08x\n", cfg);
......
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