aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/pci/common.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 862746390666..52deabc72a6f 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)
109 } 109 }
110} 110}
111 111
112static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
113{
114 struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE];
115
116 if (rom_r->parent)
117 return;
118 if (rom_r->start)
119 /* we deal with BIOS assigned ROM later */
120 return;
121 if (!(pci_probe & PCI_ASSIGN_ROMS))
122 rom_r->start = rom_r->end = rom_r->flags = 0;
123}
124
112/* 125/*
113 * Called after each bus is probed, but before its children 126 * Called after each bus is probed, but before its children
114 * are examined. 127 * are examined.
@@ -116,8 +129,12 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b)
116 129
117void __devinit pcibios_fixup_bus(struct pci_bus *b) 130void __devinit pcibios_fixup_bus(struct pci_bus *b)
118{ 131{
132 struct pci_dev *dev;
133
119 pcibios_fixup_ghosts(b); 134 pcibios_fixup_ghosts(b);
120 pci_read_bridge_bases(b); 135 pci_read_bridge_bases(b);
136 list_for_each_entry(dev, &b->devices, bus_list)
137 pcibios_fixup_device_resources(dev);
121} 138}
122 139
123/* 140/*