[POWERPC] Ensure we only handle PowerMac PCI bus fixup for memory resources
authorKumar Gala <galak@kernel.crashing.org>
Sat, 12 Jan 2008 23:23:26 +0000 (17:23 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 24 Jan 2008 01:30:28 +0000 (19:30 -0600)
The fixup code that handles the case for PowerMac's that leave bridge
windows open over an inaccessible region should only be applied to
memory resources (IORESOURCE_MEM).  If not we can get it trying to fixup
IORESOURCE_IO on some systems since the other conditions that are used to
detect the case can easily match for IORESOURCE_IO.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/kernel/pci-common.c

index d394d41..7d0afd4 100644 (file)
@@ -806,7 +806,8 @@ static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
                         * equal to the pci_mem_offset of the host bridge and
                         * their size is smaller than 1M.
                         */
-                       if (res->start == hose->pci_mem_offset &&
+                       if (res->flags & IORESOURCE_MEM &&
+                           res->start == hose->pci_mem_offset &&
                            res->end < 0x100000) {
                                printk(KERN_INFO
                                       "PCI: Closing bogus Apple Firmware"