Skip to content

Commit

Permalink
powerpc/eeh: Delay probing EEH device during hotplug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gavin Shan authored and Michael Ellerman committed May 1, 2015
1 parent 1ae79b7 commit d91dafc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/powerpc/kernel/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,9 @@ void eeh_add_device_early(struct pci_dn *pdn)
if (!edev || !eeh_enabled())
return;

if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE))
return;

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

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

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

0 comments on commit d91dafc

Please sign in to comment.