d4cf72a conf: pay attention to bus minSlot/maxSlot when autoassigning PCI addresses

Authored and Committed by Laine Stump 8 years ago
    conf: pay attention to bus minSlot/maxSlot when autoassigning PCI addresses
    
    The function that auto-assigns PCI addresses was written with the
    hardcoded assumptions that any PCI bus would have slots available
    starting at 1 and ending at 31. This isn't true for many types of
    controllers (some have a single slot/port at 0, some have slots/ports
    from 0 to 31). This patch updates that function to remove the
    hardcoded assumptions. It will properly find/assign addresses for
    devices that can only connect to pcie-(root|downstream)-port (which
    have minSlot/maxSlot of 0/0) or a pcie-switch-upstream-port (0/31).
    
    It still will not auto-create a new bus of the proper kind for these
    connections when one doesn't exist, that task is for another day.
    
        
file modified
+41 -29