Skip to content

Commit d91dafc

Browse files
Gavin Shanmpe
authored andcommitted
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: ff57b45 ("powerpc/eeh: Do probe on pci_dn") Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 1ae79b7 commit d91dafc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/powerpc/kernel/eeh.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,9 @@ void eeh_add_device_early(struct pci_dn *pdn)
10611061
if (!edev || !eeh_enabled())
10621062
return;
10631063

1064+
if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE))
1065+
return;
1066+
10641067
/* USB Bus children of PCI devices will not have BUID's */
10651068
phb = edev->phb;
10661069
if (NULL == phb ||
@@ -1115,6 +1118,9 @@ void eeh_add_device_late(struct pci_dev *dev)
11151118
return;
11161119
}
11171120

1121+
if (eeh_has_flag(EEH_PROBE_MODE_DEV))
1122+
eeh_ops->probe(pdn, NULL);
1123+
11181124
/*
11191125
* The EEH cache might not be removed correctly because of
11201126
* unbalanced kref to the device during unplug time, which

0 commit comments

Comments
 (0)