On Tue, 2 Aug 2005, Ivan Kokshaysky wrote: > > Right, and this hurts the cardbus as well... > But it should be pretty easy to learn the PCI layer to allocate above > PCIBIOS_MIN_IO _only_ when we allocate on the root bus. > Something like this (completely untested)?
I think you'd have to follow the "transparent" case down.. And even then you'd have the half-transparent case to worry about it. So I think it would be much easier to just make the change in "pci_bus_alloc_resource()", and say that if the parent resource that we're testing starts at some non-zero value, we just use that instead of "min" when we call down to allocate_resource(). That gets it for MEM resources too. Something like the following (also _totally_ untested, but even simpler than yours). It basically says: if the parent resource starts at non-zero, we use that as the starting point for allocations, otherwise the passed-in value. That, together with changing PCIBIOS_MIN_IO to 0x2000 (or even 0x4000) might be the ticket... Linus ---- diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -60,7 +60,9 @@ pci_bus_alloc_resource(struct pci_bus *b continue; /* Ok, try it out.. */ - ret = allocate_resource(r, res, size, min, -1, align, + ret = allocate_resource(r, res, size, + r->start ? : min, + -1, align, alignf, alignf_data); if (ret == 0) break; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/