diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-02-28 22:58:03 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-03-12 19:09:27 -0400 |
commit | 7f172890a8f8744c4005c267ae9e228411ab173f (patch) | |
tree | d4f5b06cf762d3ec2c61021d36f88e6e0564b199 | |
parent | 595be948cce574ff2d5dde5d0426a636a4363c70 (diff) |
[POWERPC] Fix bogus test for unassigned PCI resources
A bogus test for unassigned resources that came from our 32-bit
PCI code ended up being "merged" by my previous patch series,
breaking some 64-bit setups where devices have legal resources
ending at 0xffffffff.
This fixes it by completely changing the test. We now test for
res->start == 0, as the generic code expects, and we also only
do so on platforms that don't have the PPC_PCI_PROBE_ONLY flag
set, as there are cases of pSeries and iSeries where it could
be a valid value and those can't reassign devices.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 980fe32895c0..89c83ccb85c1 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -748,7 +748,13 @@ static void __devinit pcibios_fixup_resources(struct pci_dev *dev) | |||
748 | struct resource *res = dev->resource + i; | 748 | struct resource *res = dev->resource + i; |
749 | if (!res->flags) | 749 | if (!res->flags) |
750 | continue; | 750 | continue; |
751 | if (res->end == 0xffffffff) { | 751 | /* On platforms that have PPC_PCI_PROBE_ONLY set, we don't |
752 | * consider 0 as an unassigned BAR value. It's technically | ||
753 | * a valid value, but linux doesn't like it... so when we can | ||
754 | * re-assign things, we do so, but if we can't, we keep it | ||
755 | * around and hope for the best... | ||
756 | */ | ||
757 | if (res->start == 0 && !(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) { | ||
752 | pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n", | 758 | pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n", |
753 | pci_name(dev), i, | 759 | pci_name(dev), i, |
754 | (unsigned long long)res->start, | 760 | (unsigned long long)res->start, |