]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Turn on reallocation for unassigned resources with host bridge offset
authorYinghai Lu <yinghai@kernel.org>
Mon, 22 Jul 2013 21:37:14 +0000 (14:37 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 25 Jul 2013 18:35:02 +0000 (12:35 -0600)
commit585d038b04d7c4cb68cb37fe4a29cf1a8c0d27a2
tree3437173284dff5d626a944be0215c1aeebc1e4df
parent7a3178e930ec2dc6b4bd991641bde2b672f5567d
PCI: Turn on reallocation for unassigned resources with host bridge offset

Previously we did not turn on automatic PCI resource reallocation for
unassigned IOV resources behind a host bridge with address offset.  This
patch fixes that bug.

The intent was that "!r->start" would check for a BAR containing zero.  But
that check is incorrect for host bridges that apply an offset, because in
that case the resource address is not the same as the bus address.

This patch fixes that by converting the resource address back to a bus
address before checking for zero.

[bhelgaas: changelog]
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/setup-bus.c