public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: only release that resource index is less than 3
@ 2009-10-24  9:25 Yinghai Lu
  2009-10-26 16:32 ` Bjorn Helgaas
  0 siblings, 1 reply; 9+ messages in thread
From: Yinghai Lu @ 2009-10-24  9:25 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ingo Molnar


after

| commit 308cf8e13f42f476dfd6552aeff58fdc0788e566
|
|    PCI: get larger bridge ranges when space is available

found one of resource of peer root bus (0x00) get released from root
resource. later one hotplug device can not get big range anymore.
other peer root buses is ok.

it turns out it is from transparent path.

those resources will be used for pci bridge BAR updated.
so need to limit it to 3.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/pci/setup-bus.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/pci/setup-bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/setup-bus.c
+++ linux-2.6/drivers/pci/setup-bus.c
@@ -344,9 +344,14 @@ static struct resource *find_free_bus_re
 			 * if there is no child under that, we should release
 			 * and use it. don't need to reset it, pbus_size_* will
 			 * set it again
+			 * need to be less 3, otherwise can not write it to
+			 * bridge, also need to avoid releasing it from
+			 * transparent bus path
 			 */
-			if (!r->child && !release_resource(r))
-				return r;
+			if (i < 3 && !r->child) {
+				if (!release_resource(r))
+					return r;
+			}
 		}
 	}
 	return NULL;

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

end of thread, other threads:[~2009-10-28  3:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-24  9:25 [PATCH] pci: only release that resource index is less than 3 Yinghai Lu
2009-10-26 16:32 ` Bjorn Helgaas
2009-10-26 17:19   ` Jesse Barnes
2009-10-26 21:23     ` Yinghai Lu
2009-10-26 23:57       ` Bjorn Helgaas
2009-10-27  0:20         ` Yinghai Lu
2009-10-27 16:09           ` Bjorn Helgaas
2009-10-28  3:45             ` Yinghai Lu
2009-10-26 19:38   ` Yinghai Lu

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