From: Yinghai on


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(a)hexapodia.org>
Cc: Bjorn Helgaas <bjorn.helgaas(a)hp.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas(a)hp.com>
Signed-off-by: Yinghai Lu <yinghai(a)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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/