diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2015-04-30 19:22:15 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-30 23:52:32 -0400 |
commit | d91dafc02f42e23c1a906202ebde5d7c49ef058d (patch) | |
tree | 052bf14e9ed505257ee2cad44048b0c7ba264154 /arch | |
parent | 1ae79b78bc52b910a224f3795122538516e07b5f (diff) |
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: ff57b454ddb9 ("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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index fa046ca6d0fa..9ee61d15653d 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c | |||
@@ -1061,6 +1061,9 @@ void eeh_add_device_early(struct pci_dn *pdn) | |||
1061 | if (!edev || !eeh_enabled()) | 1061 | if (!edev || !eeh_enabled()) |
1062 | return; | 1062 | return; |
1063 | 1063 | ||
1064 | if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE)) | ||
1065 | return; | ||
1066 | |||
1064 | /* USB Bus children of PCI devices will not have BUID's */ | 1067 | /* USB Bus children of PCI devices will not have BUID's */ |
1065 | phb = edev->phb; | 1068 | phb = edev->phb; |
1066 | if (NULL == phb || | 1069 | if (NULL == phb || |
@@ -1115,6 +1118,9 @@ void eeh_add_device_late(struct pci_dev *dev) | |||
1115 | return; | 1118 | return; |
1116 | } | 1119 | } |
1117 | 1120 | ||
1121 | if (eeh_has_flag(EEH_PROBE_MODE_DEV)) | ||
1122 | eeh_ops->probe(pdn, NULL); | ||
1123 | |||
1118 | /* | 1124 | /* |
1119 | * The EEH cache might not be removed correctly because of | 1125 | * The EEH cache might not be removed correctly because of |
1120 | * unbalanced kref to the device during unplug time, which | 1126 | * unbalanced kref to the device during unplug time, which |