[PATCH] powerpc: Remove bogus sanity check in pci -> OF node code

Benjamin Herrenschmidt benh at au1.ibm.com
Thu Jan 11 16:38:22 EST 2007


The new implementation of pci_device_to_OF_node() on ppc32 has a bogus
sanity check in it that can cause oopses at boot when no device node is
present, and might hit correct cases with older/weird apple device-trees
where they have the type "vci" for the chaos bridge.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---

Zang, please confirm that this fixes your problem. If it does, paulus,
this should go in 2.6.20


Index: linux-work/arch/powerpc/kernel/pci_32.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/pci_32.c	2007-01-11 16:30:09.000000000 +1100
+++ linux-work/arch/powerpc/kernel/pci_32.c	2007-01-11 16:30:31.000000000 +1100
@@ -775,11 +775,6 @@ static struct device_node *scan_OF_for_p
 	np = scan_OF_for_pci_dev(parent, bus->self->devfn);
 	of_node_put(parent);
 
-	/* sanity check */
-	if (strcmp(np->type, "pci") != 0)
-		printk(KERN_WARNING "pci: wrong type \"%s\" for bridge %s\n",
-		       np->type, np->full_name);
-
 	return np;
 }
 





More information about the Linuxppc-dev mailing list