pci-hyperv.c and pci_bus_assign_resources()
Hi Folks !
As part of my consolidation of the PCI resource survey, pci-hyperv is getting a bit in the way, I need help understanding what exactly it needs here when it calls pci_bus_assign_resources().
As you can see at:
https://git.kernel.org/pub/scm/linux/kernel/git/benh/pci.git/
I have removed all call sites of pci_bus_assign_resources() except that one.
So far, as far as I understand and provided I didn't screw up, they were all either part of a pair doing:
pci_bus_size_bridges(bus); pci_bus_assign_resources(bus);
or trying to assign a single added device, or buggy controller code who did pci_bus_assign_resources() without doing pci_bus_size_bridges() first.
pci-hyperv is a bit of a mystery however. The call to pci_bus_assign_resources() alone will try to assign resources to devices but will not assign anything to bridges. So any bridge will be left as-is. Now on x86, pcibios_fixup_bus() will call pci_read_bridge_bases(), so any such bridge will at least get its resources read from the hw, but not allocated (parent won't be set).
So it all a bit odd ...
What is the context here ? What may be hanging off that bus when it's added ? Should it be calling pci_assign_unassigned_bridge_resources() instead like other hotplug drivers do ? Something else ?
Thanks !
Cheers,
Ben.