]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pci: Check the bus address instead of resource address in pcibios_fixup_resources
authorKevin Hao <haokexin@gmail.com>
Wed, 5 Jun 2013 02:26:51 +0000 (02:26 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 9 Jun 2013 22:36:13 +0000 (08:36 +1000)
commit7275d92de8783808d108b48e9753806df68e9fce
treedb4cc10d87a6c823888034972541c4274cfc6260
parent85d407a7acd8ae9920262257baafac52126799a6
powerpc/pci: Check the bus address instead of resource address in pcibios_fixup_resources

If a BAR has the value of 0, we would assume that it is unset yet and
then mark the resource as unset and would reassign it later. But after
commit f533a60d (powerpc/PCI: get rid of device resource fixups)
the pcibios_fixup_resources is invoked after the bus address was
translated to linux resource. So the value of res->start is resource
address. And since the resource and bus address may be different, we
should translate it to the bus address before doing the check.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/pci-common.c