• Benjamin Herrenschmidt's avatar
    PCI: Workaround invalid P2P bridge bus numbers · a1c19894
    Benjamin Herrenschmidt authored
    Some firmware fail to properly configure P2P bridges, leaving them
    with invalid bus numbers. In some cases, this happens on some embedded
    4xx boards as the result of the kernel allocating different bus space
    than the firmware does to host bridges while not setting
    pcibios_assign_all_busses() for various reasons. In other cases, it can
    just be bogus firmware.
    
    This adds some sanity checking to the PCI probing code. If a bridge is
    found whose primary bus number doesn't match the bus it's sitting on,
    or whose secondary bus number not strictly above it's primary bus
    number, then the bridge bus numbers are deconfigured in the first pass
    of pci_scan_bridge() to be re-assigned in the second pass.
    Tested-by: default avatar"Ayman El-Khashab" <AymanE@tanisys.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    a1c19894
probe.c 31.2 KB