aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-31 13:11:17 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-31 13:11:17 +1100
commitd4ed11aa4881246e1e36e0189f30f053f140370c (patch)
tree233ca0735d061155a2f94fddebbec683f793eeae /arch/powerpc/kernel
parentpowerpc/pci: Add PCI resource alignment documentation (diff)
parentpowerpc/powernv: Don't map M64 segments using M32DT (diff)
downloadlinux-dev-d4ed11aa4881246e1e36e0189f30f053f140370c.tar.xz
linux-dev-d4ed11aa4881246e1e36e0189f30f053f140370c.zip
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)
{
struct eeh_pe *pe, *parent;
+ /* Check if the PE number is valid */
+ if (!eeh_has_flag(EEH_VALID_PE_ZERO) && !edev->pe_config_addr) {
+ pr_err("%s: Invalid PE#0 for edev 0x%x on PHB#%d\n",
+ __func__, edev->config_addr, edev->phb->global_number);
+ return -EINVAL;
+ }
+
/*
* Search the PE has been existing or not according
* to the PE address. If that has been existing, the
@@ -336,12 +343,6 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev)
*/
pe = eeh_pe_get(edev);
if (pe && !(pe->type & EEH_PE_INVALID)) {
- if (!edev->pe_config_addr) {
- pr_err("%s: PE with addr 0x%x already exists\n",
- __func__, edev->config_addr);
- return -EEXIST;
- }
-
/* Mark the PE as type of PCI bus */
pe->type = EEH_PE_BUS;
edev->pe = pe;