Thread (2 messages) flat view 2 messages, 2 authors, 2007-01-11
STALE7194d

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

From: Benjamin Herrenschmidt <hidden>
Date: 2007-01-11 05:40:42

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@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;
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help