diff options
author | Paul Mackerras <paulus@samba.org> | 2008-01-31 11:25:51 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-31 11:25:51 +1100 |
commit | bd45ac0c5daae35e7c71138172e63df5cf644cf6 (patch) | |
tree | 5eb5a599bf6a9d7a8a34e802db932aa9e9555de4 /arch/x86/pci/common.c | |
parent | 4eece4ccf997c0e6d8fdad3d842e37b16b8d705f (diff) | |
parent | 5bdeae46be6dfe9efa44a548bd622af325f4bdb4 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/x86/pci/common.c')
-rw-r--r-- | arch/x86/pci/common.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 86274639066..52deabc72a6 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -109,6 +109,19 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b) } } +static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) +{ + struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; + + if (rom_r->parent) + return; + if (rom_r->start) + /* we deal with BIOS assigned ROM later */ + return; + if (!(pci_probe & PCI_ASSIGN_ROMS)) + rom_r->start = rom_r->end = rom_r->flags = 0; +} + /* * Called after each bus is probed, but before its children * are examined. @@ -116,8 +129,12 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b) void __devinit pcibios_fixup_bus(struct pci_bus *b) { + struct pci_dev *dev; + pcibios_fixup_ghosts(b); pci_read_bridge_bases(b); + list_for_each_entry(dev, &b->devices, bus_list) + pcibios_fixup_device_resources(dev); } /* |