Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d91dafc0 authored by Gavin Shan's avatar Gavin Shan Committed by Michael Ellerman
Browse files

powerpc/eeh: Delay probing EEH device during hotplug



Commit 1c509148b ("powerpc/eeh: Do probe on pci_dn") probes EEH
devices in early stage, which is reasonable to pSeries platform.
However, it's wrong for PowerNV platform because the PE# isn't
determined until the resources (IO and MMIO) are assigned to
PE in hotplug case. So we have to delay probing EEH devices
for PowerNV platform until the PE# is assigned.

Fixes: ff57b454 ("powerpc/eeh: Do probe on pci_dn")
Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 1ae79b78
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1061,6 +1061,9 @@ void eeh_add_device_early(struct pci_dn *pdn)
	if (!edev || !eeh_enabled())
	if (!edev || !eeh_enabled())
		return;
		return;


	if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE))
		return;

	/* USB Bus children of PCI devices will not have BUID's */
	/* USB Bus children of PCI devices will not have BUID's */
	phb = edev->phb;
	phb = edev->phb;
	if (NULL == phb ||
	if (NULL == phb ||
@@ -1115,6 +1118,9 @@ void eeh_add_device_late(struct pci_dev *dev)
		return;
		return;
	}
	}


	if (eeh_has_flag(EEH_PROBE_MODE_DEV))
		eeh_ops->probe(pdn, NULL);

	/*
	/*
	 * The EEH cache might not be removed correctly because of
	 * The EEH cache might not be removed correctly because of
	 * unbalanced kref to the device during unplug time, which
	 * unbalanced kref to the device during unplug time, which