aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2005-07-06 19:07:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-06 19:12:58 -0400
commit960b8466548c9bc6f718b5f470c1a58000fab09d (patch)
tree9dfe507f4b1d5dcde83249754a66d76a9851294f
parent107177410b754b597028e430725bc3b316936b6b (diff)
[PATCH] yet another fix for setup-bus.c/x86 merge
There is a slight disagreement between setup-bus.c code and traditional x86 PCI setup wrt which recourses are invalid vs resources that are free for further allocations. In particular, in the setup-bus.c, if we failed to allocate some resource, we nullify "start" and "flags" fields, but *not* the "end" one. But x86 pcibios_enable_resources() does the following check: if (!r->start && r->end) { printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev)); return -EINVAL; which means that the device owning the offending resource cannot be enabled. In particular, this breaks cardbus behind the normal decode p2p bridge - the cardbus code from setup-bus.c requests rather large IO and MEM windows, and if it fails, the socket is completely unavailable. Which is wrong, as the yenta code is capable to allocate smaller windows. Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/pci/setup-bus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index c1bdfb424658..9fe48f712be9 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -74,6 +74,7 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
74 idx = res - &list->dev->resource[0]; 74 idx = res - &list->dev->resource[0];
75 if (pci_assign_resource(list->dev, idx)) { 75 if (pci_assign_resource(list->dev, idx)) {
76 res->start = 0; 76 res->start = 0;
77 res->end = 0;
77 res->flags = 0; 78 res->flags = 0;
78 } 79 }
79 tmp = list; 80 tmp = list;