Drivers typically use pci_request_regions() to reserve the resources they use, but that fails if the resource is already busy. Therefore, we should ignore busy resources when we're assigning resources to a device. [commit log is from Bjorn] Tested-by: Andy Isaacson <adi@hexapodia.org> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> --- drivers/pci/bus.c | 4 ++++ 1 file changed, 4 insertions(+) Index: linux-2.6/drivers/pci/bus.c =================================================================== --- linux-2.6.orig/drivers/pci/bus.c +++ linux-2.6/drivers/pci/bus.c @@ -103,6 +103,10 @@ pci_bus_alloc_resource(struct pci_bus *b if (!r) continue; + /* Driver can not reserve it later, so don't use it */ + if (r->flags & IORESOURCE_BUSY) + continue; + /* type_mask must match */ if ((res->flags ^ r->flags) & type_mask) continue; --
