Thread (2 messages) 2 messages, 2 authors, 2006-11-28

Re: [PATCH] powerpc: fix OF pci flags parsing

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-11-28 08:46:48

On Mon, 2006-11-27 at 21:21 -0600, Olof Johansson wrote:
For PCI devices with only io ports, of_bus_pci_get_flags() will fall
through and still mark the resource as IORESOURCE_MEM.


Signed-off-by: Olof Johansson <redacted>
Oops :-) 

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
quoted hunk ↗ jump to hunk
---

This should be fine to hold until 2.6.20, since noone (as far as I
know) has hit it in the wild.

diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 346fb7b..0dfbe1c 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -160,9 +160,11 @@ static unsigned int of_bus_pci_get_flags
 	switch((w >> 24) & 0x03) {
 	case 0x01:
 		flags |= IORESOURCE_IO;
+		break;
 	case 0x02: /* 32 bits */
 	case 0x03: /* 64 bits */
 		flags |= IORESOURCE_MEM;
+		break;
 	}
 	if (w & 0x40000000)
 		flags |= IORESOURCE_PREFETCH;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help