mpc8568e-mds: pci-e is broken

Kumar Gala galak at kernel.crashing.org
Thu Jan 24 10:02:10 EST 2008


Anton,

Can you try this patch and see if it resolves the issue for you.. (You'll
still get the Apple FW messages)

- k

diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 4005739..bf13c21 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -133,22 +133,23 @@ void fsl_pcibios_fixup_bus(struct pci_bus *bus)
 	struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
 	int i;

-	/* deal with bogus pci_bus when we don't have anything connected on PCIe */
-	if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
-		if (bus->parent) {
-			for (i = 0; i < 4; ++i)
-				bus->resource[i] = bus->parent->resource[i];
-		}
-	}
-
-	if (fsl_pcie_bus_fixup &&
-	    (bus->parent == hose->bus) &&
-	     early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {
+	if ((bus->parent == hose->bus) &&
+	    ((fsl_pcie_bus_fixup &&
+	      early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) ||
+	     (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)))
+	{
 		for (i = 0; i < 4; ++i) {
-			if (bus->resource[i] && bus->parent->resource[i]) {
-				bus->resource[i]->start = bus->parent->resource[i]->start;
-				bus->resource[i]->end = bus->parent->resource[i]->end;
-				bus->resource[i]->flags = bus->parent->resource[i]->flags;
+			struct resource *res = bus->resource[i];
+			struct resource *par = bus->parent->resource[i];
+			if (res) {
+				res->start = 0;
+				res->end   = 0;
+				res->flags = 0;
+			}
+			if (res && par) {
+				res->start = par->start;
+				res->end   = par->end;
+				res->flags = par->flags;
 			}
 		}
 	}



More information about the Linuxppc-dev mailing list