linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 6/8] Let subordinate transparent bridges be transparent.
@ 2007-06-01 17:48 Jon Loeliger
  2007-06-01 23:26 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Loeliger @ 2007-06-01 17:48 UTC (permalink / raw)
  To: linuxppc-dev@ozlabs.org

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.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
 arch/powerpc/kernel/pci_32.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index e66064b..102264c 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -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
-- 
1.5.0.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 6/8] Let subordinate transparent bridges be transparent.
  2007-06-01 17:48 [PATCH 6/8] Let subordinate transparent bridges be transparent Jon Loeliger
@ 2007-06-01 23:26 ` Benjamin Herrenschmidt
  2007-06-04 18:51   ` Jon Loeliger
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2007-06-01 23:26 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org

On Fri, 2007-06-01 at 12:48 -0500, Jon Loeliger wrote:
> 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.
> 
> Signed-off-by: York Sun <yorksun@freescale.com>
> Signed-off-by: Andy Fleming <afleming@freescale.com>
> Signed-off-by: Jon Loeliger <jdl@freescale.com>
> ---

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 6/8] Let subordinate transparent bridges be transparent.
  2007-06-01 23:26 ` Benjamin Herrenschmidt
@ 2007-06-04 18:51   ` Jon Loeliger
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Loeliger @ 2007-06-04 18:51 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev@ozlabs.org

On Fri, 2007-06-01 at 18:26, Benjamin Herrenschmidt wrote:

> 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;

Right.  Fixed as indicated.

Thanks,
jdl

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-04 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-01 17:48 [PATCH 6/8] Let subordinate transparent bridges be transparent Jon Loeliger
2007-06-01 23:26 ` Benjamin Herrenschmidt
2007-06-04 18:51   ` Jon Loeliger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).