]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Fix starting basis for resource requests
authorMyron Stowe <mstowe@redhat.com>
Mon, 21 Nov 2011 18:54:07 +0000 (11:54 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 14 Feb 2012 16:44:45 +0000 (08:44 -0800)
commit8cbf49eb7e5101179c342f2c1e249e00986494c9
tree7f75b60c3a010e5699e43b38853fbd33f85d9267
parent84a20c73b7948a70a324362933124735162573d4
PCI: Fix starting basis for resource requests

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: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/setup-res.c