diff --git a/[refs] b/[refs] index 674f5e770f83..d07fb44ca8b7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bca25bafbb390eeec376ac994954b99489d198ec +refs/heads/master: 9f8daccaa05c14e5643bdd4faf5aed9cc8e6f11e diff --git a/trunk/arch/x86/pci/common.c b/trunk/arch/x86/pci/common.c index 862746390666..52deabc72a6f 100644 --- a/trunk/arch/x86/pci/common.c +++ b/trunk/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); } /*