Skip to contentSkip to conversation

Let subordinate transparent bridges be transparent.

PATCH Superseded Jon Loeliger 2 participants 3 messages Jun 1, 2007 – Jun 4, 2007 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 6/8 Let subordinate transparent bridges be transparent.

In pcibios_fixup_bus(), bridges that are subordinate to transparent bridges were still relocating their IORESOURCE_IO start and end values.

Fix this by preventing the transparent bridge from relocating the start and end values, thus allowing the subordinate non-transparent bridge full molestation rights.

---
 arch/powerpc/kernel/pci_32.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/powerpc/kernel/pci_32.c +3 -1
index e66064b..102264c 100644
@@ -1372,7 +1372,9 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
 				continue;
 			if (!res->flags)
 				continue;
-			if (io_offset && (res->flags & IORESOURCE_IO)) {
+			if (!bus->self->transparent
+			    && io_offset
+			    && (res->flags & IORESOURCE_IO)) {
 				res->start += io_offset;
 				res->end += io_offset;
 			} else if (hose->pci_mem_offset
Signature · 1 line
1.5.0.3
#1 lore raw
Quoted 4 lines · Jon Loeliger

In pcibios_fixup_bus(), bridges that are subordinate to transparent bridges were still relocating their IORESOURCE_IO start and end values.

Quoted 8 lines

Fix this by preventing the transparent bridge from relocating the start and end values, thus allowing the subordinate non-transparent bridge full molestation rights.

---

NAK. The mem case needs a similar fix. I think we should instead do

- if (!res->flags)
- continue;
+ if (!res->flags || bus->self->transparent)
+ continue;

Cheers,
Ben.

#2 lore raw

Review

Quoted 6 lines · Benjamin Herrenschmidt

NAK. The mem case needs a similar fix. I think we should instead do

(quoted diff) +2 -2
- 			if (!res->flags)
- 				continue;
+ 			if (!res->flags || bus->self->transparent)
+ 				continue;

Right. Fixed as indicated.

Thanks,
jdl