powerpc/eeh: Convert log messages to eeh_edev_* macros
Convert existing messages, where appropriate, to use the eeh_edev_* logging macros. The only effect should be minor adjustments to the log messages, apart from: - A new message in pseries_eeh_probe() "Probing device" to match the powernv case. - The "Probing device" message in pnv_eeh_probe() is now generated slightly later, which will mean that it is no longer emitted for devices that aren't probed due to the initial checks. Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/ce505a0a7a4a5b0367f0f40f8b26e7c0a9cf4cb7.1565930772.git.sbobroff@linux.ibm.com
This commit is contained in:

committed by
Michael Ellerman

orang tua
b093f2cbed
melakukan
1ff8f36fc7
@@ -44,7 +44,7 @@ void pnv_pcibios_bus_add_device(struct pci_dev *pdev)
|
||||
if (eeh_has_flag(EEH_FORCE_DISABLED))
|
||||
return;
|
||||
|
||||
pr_debug("%s: EEH: Setting up device %s.\n", __func__, pci_name(pdev));
|
||||
dev_dbg(&pdev->dev, "EEH: Setting up device\n");
|
||||
eeh_add_device_early(pdn);
|
||||
eeh_add_device_late(pdev);
|
||||
eeh_sysfs_add_device(pdev);
|
||||
@@ -370,10 +370,6 @@ static void *pnv_eeh_probe(struct pci_dn *pdn, void *data)
|
||||
int ret;
|
||||
int config_addr = (pdn->busno << 8) | (pdn->devfn);
|
||||
|
||||
pr_debug("%s: probing %04x:%02x:%02x.%01x\n",
|
||||
__func__, hose->global_number, pdn->busno,
|
||||
PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn));
|
||||
|
||||
/*
|
||||
* When probing the root bridge, which doesn't have any
|
||||
* subordinate PCI devices. We don't have OF node for
|
||||
@@ -387,6 +383,8 @@ static void *pnv_eeh_probe(struct pci_dn *pdn, void *data)
|
||||
if ((pdn->class_code >> 8) == PCI_CLASS_BRIDGE_ISA)
|
||||
return NULL;
|
||||
|
||||
eeh_edev_dbg(edev, "Probing device\n");
|
||||
|
||||
/* Initialize eeh device */
|
||||
edev->class_code = pdn->class_code;
|
||||
edev->mode &= 0xFFFFFF00;
|
||||
@@ -412,9 +410,7 @@ static void *pnv_eeh_probe(struct pci_dn *pdn, void *data)
|
||||
/* Create PE */
|
||||
ret = eeh_add_to_parent_pe(edev);
|
||||
if (ret) {
|
||||
pr_warn("%s: Can't add PCI dev %04x:%02x:%02x.%01x to parent PE (%x)\n",
|
||||
__func__, hose->global_number, pdn->busno,
|
||||
PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn), ret);
|
||||
eeh_edev_warn(edev, "Failed to add device to PE (code %d)\n", ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -472,10 +468,7 @@ static void *pnv_eeh_probe(struct pci_dn *pdn, void *data)
|
||||
/* Save memory bars */
|
||||
eeh_save_bars(edev);
|
||||
|
||||
pr_debug("%s: EEH enabled on %02x:%02x.%01x PHB#%x-PE#%x\n",
|
||||
__func__, pdn->busno, PCI_SLOT(pdn->devfn),
|
||||
PCI_FUNC(pdn->devfn), edev->pe->phb->global_number,
|
||||
edev->pe->addr);
|
||||
eeh_edev_dbg(edev, "EEH enabled on device\n");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user