aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/eeh.h5
-rw-r--r--arch/powerpc/kernel/eeh.c4
-rw-r--r--arch/powerpc/kernel/eeh_pe.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index 9983c3d26bca..757014fe23d3 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -146,6 +146,11 @@ static inline struct pci_dev *eeh_dev_to_pci_dev(struct eeh_dev *edev)
146 return edev ? edev->pdev : NULL; 146 return edev ? edev->pdev : NULL;
147} 147}
148 148
149static inline struct eeh_pe *eeh_dev_to_pe(struct eeh_dev* edev)
150{
151 return edev ? edev->pe : NULL;
152}
153
149/* Return values from eeh_ops::next_error */ 154/* Return values from eeh_ops::next_error */
150enum { 155enum {
151 EEH_NEXT_ERR_NONE = 0, 156 EEH_NEXT_ERR_NONE = 0,
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 59a64f8dc85f..0f1b63714718 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -410,7 +410,7 @@ int eeh_dev_check_failure(struct eeh_dev *edev)
410 } 410 }
411 dn = eeh_dev_to_of_node(edev); 411 dn = eeh_dev_to_of_node(edev);
412 dev = eeh_dev_to_pci_dev(edev); 412 dev = eeh_dev_to_pci_dev(edev);
413 pe = edev->pe; 413 pe = eeh_dev_to_pe(edev);
414 414
415 /* Access to IO BARs might get this far and still not want checking. */ 415 /* Access to IO BARs might get this far and still not want checking. */
416 if (!pe) { 416 if (!pe) {
@@ -634,7 +634,7 @@ int eeh_pci_enable(struct eeh_pe *pe, int function)
634int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state) 634int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
635{ 635{
636 struct eeh_dev *edev = pci_dev_to_eeh_dev(dev); 636 struct eeh_dev *edev = pci_dev_to_eeh_dev(dev);
637 struct eeh_pe *pe = edev->pe; 637 struct eeh_pe *pe = eeh_dev_to_pe(edev);
638 638
639 if (!pe) { 639 if (!pe) {
640 pr_err("%s: No PE found on PCI device %s\n", 640 pr_err("%s: No PE found on PCI device %s\n",
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c
index 00e3844525a6..5864017e2bd9 100644
--- a/arch/powerpc/kernel/eeh_pe.c
+++ b/arch/powerpc/kernel/eeh_pe.c
@@ -428,7 +428,7 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev)
428 } 428 }
429 429
430 /* Remove the EEH device */ 430 /* Remove the EEH device */
431 pe = edev->pe; 431 pe = eeh_dev_to_pe(edev);
432 edev->pe = NULL; 432 edev->pe = NULL;
433 list_del(&edev->list); 433 list_del(&edev->list);
434 434