• Myron Stowe's avatar
    PCI: Fix starting basis for resource requests · 351fc6d1
    Myron Stowe authored
    pci_revert_fw_address() is used to reinstate a PCI device's original
    FW-assigned BIOS BAR value(s) if normal resource assignment fails.
    
    When attempting to reinstate an address, the point within the resource
    tree from which to attempt the new resource request should be the parent
    resource corresponding to the device, not the base of the resource tree
    (ioport_resource or iomem_resource).  For PCI devices this would
    typically be the resource corresponding to the upstream PCI host bridge
    or P2P bridge aperture.
    
    This patch sets the point within the resource tree to attempt a new
    resource assignment request to the PCI device's parent resource and only
    if that fails does it fall back to the base ioport_resource or
    iomem_resource.
    Signed-off-by: default avatarMyron Stowe <myron.stowe@redhat.com>
    Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    351fc6d1
setup-res.c 8.84 KB