aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-30 22:11:17 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-30 22:11:17 -0400
commitd4ed11aa4881246e1e36e0189f30f053f140370c (patch)
tree233ca0735d061155a2f94fddebbec683f793eeae /arch/powerpc/kernel
parent330524404298b2142d2e3a2f64251ca855d55d72 (diff)
parent027fa02f84e851e21daffdf8900d6117071890f8 (diff)
Merge branch 'next-eeh' into next-sriov
Merge in Gavin EEH fixes
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/eeh_pe.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c
index f33ceccf6876..35f0b62259bb 100644
--- a/arch/powerpc/kernel/eeh_pe.c
+++ b/arch/powerpc/kernel/eeh_pe.c
@@ -328,6 +328,13 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev)
328{ 328{
329 struct eeh_pe *pe, *parent; 329 struct eeh_pe *pe, *parent;
330 330
331 /* Check if the PE number is valid */
332 if (!eeh_has_flag(EEH_VALID_PE_ZERO) && !edev->pe_config_addr) {
333 pr_err("%s: Invalid PE#0 for edev 0x%x on PHB#%d\n",
334 __func__, edev->config_addr, edev->phb->global_number);
335 return -EINVAL;
336 }
337
331 /* 338 /*
332 * Search the PE has been existing or not according 339 * Search the PE has been existing or not according
333 * to the PE address. If that has been existing, the 340 * to the PE address. If that has been existing, the
@@ -336,12 +343,6 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev)
336 */ 343 */
337 pe = eeh_pe_get(edev); 344 pe = eeh_pe_get(edev);
338 if (pe && !(pe->type & EEH_PE_INVALID)) { 345 if (pe && !(pe->type & EEH_PE_INVALID)) {
339 if (!edev->pe_config_addr) {
340 pr_err("%s: PE with addr 0x%x already exists\n",
341 __func__, edev->config_addr);
342 return -EEXIST;
343 }
344
345 /* Mark the PE as type of PCI bus */ 346 /* Mark the PE as type of PCI bus */
346 pe->type = EEH_PE_BUS; 347 pe->type = EEH_PE_BUS;
347 edev->pe = pe; 348 edev->pe = pe;