[PATCH 3/3] properly configure DDR/P5IOC children devs

John Rose johnrose at austin.ibm.com
Tue Mar 7 12:04:25 EST 2006


The dynamic add path for PCI Host Bridges can fail to configure children
adapters under P5IOC controllers.  It fails to properly fixup bus/device
resources, and it fails to properly enable EEH.  Both of these steps
need to occur before any children devices are enabled in
pci_bus_add_devices().

This fix has been tested for P5IOC and non-P5IOC slots.

Thanks-
John

Signed-off-by: John Rose <johnrose at austin.ibm.com>

diff -puN arch/powerpc/kernel/pci_64.c~fixup_phb_devs arch/powerpc/kernel/pci_64.c
--- 2_6_p5/arch/powerpc/kernel/pci_64.c~fixup_phb_devs	2006-03-03 15:43:38.000000000 -0600
+++ 2_6_p5-johnrose/arch/powerpc/kernel/pci_64.c	2006-03-03 15:43:39.000000000 -0600
@@ -589,7 +589,6 @@ void __devinit scan_phb(struct pci_contr
 #endif /* CONFIG_PPC_MULTIPLATFORM */
 	if (mode == PCI_PROBE_NORMAL)
 		hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);
-	pci_bus_add_devices(bus);
 }
 
 static int __init pcibios_init(void)
@@ -608,8 +607,10 @@ static int __init pcibios_init(void)
 	printk("PCI: Probing PCI hardware\n");
 
 	/* Scan all of the recorded PCI controllers.  */
-	list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
+	list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
 		scan_phb(hose);
+		pci_bus_add_devices(hose->bus);
+	}
 
 #ifndef CONFIG_PPC_ISERIES
 	if (pci_probe_only)
diff -puN arch/powerpc/platforms/pseries/pci_dlpar.c~fixup_phb_devs arch/powerpc/platforms/pseries/pci_dlpar.c
--- 2_6_p5/arch/powerpc/platforms/pseries/pci_dlpar.c~fixup_phb_devs	2006-03-03 15:44:04.000000000 -0600
+++ 2_6_p5-johnrose/arch/powerpc/platforms/pseries/pci_dlpar.c	2006-03-03 15:46:25.000000000 -0600
@@ -195,7 +195,13 @@ struct pci_controller * __devinit init_p
 	pci_setup_phb_io_dynamic(phb, primary);
 
 	pci_devs_phb_init_dynamic(phb);
+
+	if (dn->child)
+		eeh_add_device_tree_early(dn);
+
 	scan_phb(phb);
+	pcibios_fixup_new_pci_devices(phb->bus, 0);
+	pci_bus_add_devices(phb->bus);
 
 	return phb;
 }

_




More information about the Linuxppc64-dev mailing list