summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/eeh_driver.c
diff options
context:
space:
mode:
authorLinas Vepstas <linas@linas.org>2005-11-04 03:55:01 +0300
committerPaul Mackerras <paulus@samba.org>2006-01-10 07:30:23 +0300
commit3914ac7b0e672131dc2ac8b415ada79c4ccbbb31 (patch)
tree10ea50e28257b6495cd2cb1e4f64e22fee88f20f /arch/powerpc/platforms/pseries/eeh_driver.c
parentb6495c0c8f100b882d85774f44529519befefba9 (diff)
downloadlinux-3914ac7b0e672131dc2ac8b415ada79c4ccbbb31.tar.xz
[PATCH] powerpc: handle multifunction PCI devices properly
239-eeh-multifunction-consolidate.patch New-style firmware will often place multiple different functions under a non-EEH-aware parent. However, these devices might share a common PE "partition endpoint" and config address, ad thus any EEH events will affect all of the devices in common. This patch makes the effort to find all of these common devices and handle them together. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> (cherry picked from 216810296bb97d39da8e176822e9de78d2f00187 commit)
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh_driver.c')
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 242b2923360d..1c97c89597fb 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -213,9 +213,23 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus)
if (rc)
return rc;
- /* Walk over all functions on this device */
- rtas_configure_bridge(pe_dn);
- eeh_restore_bars(pe_dn);
+ /* New-style config addrs might be shared across multiple devices,
+ * Walk over all functions on this device */
+ if (pe_dn->eeh_pe_config_addr) {
+ struct device_node *pe = pe_dn->node;
+ pe = pe->parent->child;
+ while (pe) {
+ struct pci_dn *ppe = PCI_DN(pe);
+ if (pe_dn->eeh_pe_config_addr == ppe->eeh_pe_config_addr) {
+ rtas_configure_bridge(ppe);
+ eeh_restore_bars(ppe);
+ }
+ pe = pe->sibling;
+ }
+ } else {
+ rtas_configure_bridge(pe_dn);
+ eeh_restore_bars(pe_dn);
+ }
/* Give the system 5 seconds to finish running the user-space
* hotplug shutdown scripts, e.g. ifdown for ethernet. Yes,