Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Richard Henderson <rth@twiddle.net>
Cc: axp-list@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: PCI-PCI bridges mess in 2.4.x
Date: Thu, 9 Nov 2000 17:39:20 +0300	[thread overview]
Message-ID: <20001109173920.A3205@jurassic.park.msu.ru> (raw)
In-Reply-To: <20001108154811.A28101@twiddle.net>; from rth@twiddle.net on Wed, Nov 08, 2000 at 03:48:11PM -0800

On Wed, Nov 08, 2000 at 03:48:11PM -0800, Richard Henderson wrote:
> Whee!  We're back in Bootsville.

Cool!
Meanwhile this base/limit stuff got confirmation :-)
Here is a patch against bridges-2.4.0t11-rth.

Ivan.

--- 2.4.0t11p1/drivers/pci/setup-bus.c	Wed Nov  8 19:44:42 2000
+++ linux/drivers/pci/setup-bus.c	Thu Nov  9 15:11:01 2000
@@ -88,14 +88,14 @@ pbus_assign_resources_sorted(struct pci_
 	ranges->io_end += io_reserved;
 	ranges->mem_end += mem_reserved;
 
-	/* ??? How to turn off a bus from responding to, say, I/O at
-	   all if there are no I/O ports behind the bus?  Turning off
-	   PCI_COMMAND_IO doesn't seem to do the job.  So we must
-	   allow for at least one unit.  */
-	if (ranges->io_end == ranges->io_start)
-		ranges->io_end += 1;
-	if (ranges->mem_end == ranges->mem_start)
-		ranges->mem_end += 1;
+	/* Interesting case is when, say, io_end == io_start, i.e.
+	   there is no I/O behind the bridge at all. We initialize
+	   the bridge with base=io_start and limit=io_end-1, so
+	   in this case we'll have base > limit. According to
+	   the `PCI-to-PCI Bridge Architecture Specification', this
+	   means that the bridge will not forward any I/O transactions
+	   from the primary bus to the secondary bus and will forward
+	   all I/O transactions upstream. Exactly what we want.  */
 
 	ranges->io_end = ROUND_UP(ranges->io_end, 4*1024);
 	ranges->mem_end = ROUND_UP(ranges->mem_end, 1024*1024);




  parent reply	other threads:[~2000-11-09 14:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20001101153420.A2823@jurassic.park.msu.ru>
     [not found] ` <20001101093319.A18144@twiddle.net>
     [not found]   ` <20001103111647.A8079@jurassic.park.msu.ru>
     [not found]     ` <20001103011640.A20494@twiddle.net>
2000-11-06 16:29       ` PCI-PCI bridges mess in 2.4.x Ivan Kokshaysky
2000-11-07  1:03         ` Michal Jaegermann
2000-11-07 13:12           ` Ivan Kokshaysky
2000-11-08  1:32             ` Michal Jaegermann
2000-11-08  9:39         ` Richard Henderson
2000-11-08 11:25           ` Ivan Kokshaysky
2000-11-08 17:37             ` Richard Henderson
2000-11-08 22:03               ` Ivan Kokshaysky
2000-11-08 23:48                 ` Richard Henderson
2000-11-09  0:44                   ` Michal Jaegermann
2000-11-09 14:39                   ` Ivan Kokshaysky [this message]
     [not found]                     ` <Pine.LNX.4.10.10011092123320.1438-100000@linux.local>
2000-11-09 23:17                       ` Ivan Kokshaysky
     [not found]                         ` <Pine.LNX.4.10.10011101929190.1448-100000@linux.local>
2000-11-10 21:29                           ` Ivan Kokshaysky
     [not found]                 ` <3A09D72A.C2730D0@mandrakesoft.com>
2000-11-08 23:49                   ` Richard Henderson
     [not found]           ` <3A0977A7.53641C52@mandrakesoft.com>
2000-11-08 17:20             ` Richard Henderson
2000-11-09  4:45         ` Stephen Degler
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox