• Matthew Wilcox's avatar
    PCI: Rewrite pci_scan_slot · f07852d6
    Matthew Wilcox authored
    The Alternate Routing-ID Interpretation capability allows a single device
    to have up to 256 functions.  They can be populated sparsely, so the
    current technique of scanning every eighth function is not guaranteed
    to find them all.  By introducing a 'next_fn' function pointer, we can
    use the linked list of functions in the ARI capability to scan all the
    functions which exist.
    
    We can then speed up the pci_scan_slot by skipping the scan of subsequent
    devfns for PCIe devices which are the direct children of Root Ports or
    Downstream Ports.  These devices are only permitted to implement device
    0, unless they are ARI devices, in which case they'll be scanned by the
    ARI code above.
    Signed-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
    Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    f07852d6
probe.c 34.1 KB