Home
last modified time | relevance | path

Searched hist:"960 b8466548c9bc6f718b5f470c1a58000fab09d" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/pci/
H A Dsetup-bus.cdiff 960b8466548c9bc6f718b5f470c1a58000fab09d Wed Jul 06 18:07:56 CDT 2005 Ivan Kokshaysky <ink@jurassic.park.msu.ru> [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>