On Wed, Apr 27, 2011 at 2:09 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: > On 04/27/2011 01:05 PM, Bjorn Helgaas wrote: >> >> Is that true for all PCIe hotplug topologies? What about other >> hotplug drivers that might eventually use >> pci_assign_unassigned_bridge_resources()? If we *know* all the >> devices under the bridge, why don't we just remove their resources >> explicitly? That would protect us when this assumption changes. > > no, in this case, those devices do not get resources allocated yet. > > other pci hotplug could use this function too. test case could be pcie bridge to card bus etc. I'm trying to make the point that in general, we may have to change bridge windows in order assign device resources. That bridge may have other devices below it that already have drivers bound. I think you're saying that in the special cases we deal with today, the bridge has no other devices below it, and it is safe to blindly release the resources of the device we're trying to assign. That may be true, but (a) it won't be true in the future, when we deal with more general situations, and (b) if we already know the device below the bridge, we can easily release its resources explicitly rather than using release_child_resources(). Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html