aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/mb93090-mb00/pci-vdk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-21 18:58:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-21 18:58:35 -0400
commitbda0c0afa7a694bb1459fd023515aca681e4d79a (patch)
treecd8b9d9811463de2065cbe79d59689082d6c53cf /arch/frv/mb93090-mb00/pci-vdk.c
parent904e0ab54b7591b9cb01cfc0dbbedcc8bc0d949b (diff)
parentaf40b485ea2d957ae2f237ab0e33539ae8f29562 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (42 commits) PCI: Change PCI subsystem MAINTAINER PCI: pci-iommu-iotlb-flushing-speedup PCI: pci_setup_bridge() mustn't be __devinit PCI: pci_bus_size_cardbus() mustn't be __devinit PCI: pci_scan_device() mustn't be __devinit PCI: pci_alloc_child_bus() mustn't be __devinit PCI: replace remaining __FUNCTION__ occurrences PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered PCI: Hotplug: Fix leaks in IBM Hot Plug Controller Driver - ibmphp_init_devno() PCI: clean up resource alignment management PCI: aerdrv_acpi.c: remove unneeded NULL check PCI: Update VIA CX700 quirk PCI: Expose PCI VPD through sysfs PCI: iommu: iotlb flushing PCI: simplify quirk debug output PCI: iova RB tree setup tweak PCI: parisc: use generic pci_enable_resources() PCI: ppc: use generic pci_enable_resources() PCI: powerpc: use generic pci_enable_resources() PCI: ia64: use generic pci_enable_resources() ...
Diffstat (limited to 'arch/frv/mb93090-mb00/pci-vdk.c')
-rw-r--r--arch/frv/mb93090-mb00/pci-vdk.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c
index 6d51f133fb23..f003cfa68b7a 100644
--- a/arch/frv/mb93090-mb00/pci-vdk.c
+++ b/arch/frv/mb93090-mb00/pci-vdk.c
@@ -199,58 +199,6 @@ static struct pci_ops * __init pci_check_direct(void)
199} 199}
200 200
201/* 201/*
202 * Several buggy motherboards address only 16 devices and mirror
203 * them to next 16 IDs. We try to detect this `feature' on all
204 * primary buses (those containing host bridges as they are
205 * expected to be unique) and remove the ghost devices.
206 */
207
208static void __init pcibios_fixup_ghosts(struct pci_bus *b)
209{
210 struct list_head *ln, *mn;
211 struct pci_dev *d, *e;
212 int mirror = PCI_DEVFN(16,0);
213 int seen_host_bridge = 0;
214 int i;
215
216 for (ln=b->devices.next; ln != &b->devices; ln=ln->next) {
217 d = pci_dev_b(ln);
218 if ((d->class >> 8) == PCI_CLASS_BRIDGE_HOST)
219 seen_host_bridge++;
220 for (mn=ln->next; mn != &b->devices; mn=mn->next) {
221 e = pci_dev_b(mn);
222 if (e->devfn != d->devfn + mirror ||
223 e->vendor != d->vendor ||
224 e->device != d->device ||
225 e->class != d->class)
226 continue;
227 for(i=0; i<PCI_NUM_RESOURCES; i++)
228 if (e->resource[i].start != d->resource[i].start ||
229 e->resource[i].end != d->resource[i].end ||
230 e->resource[i].flags != d->resource[i].flags)
231 continue;
232 break;
233 }
234 if (mn == &b->devices)
235 return;
236 }
237 if (!seen_host_bridge)
238 return;
239 printk("PCI: Ignoring ghost devices on bus %02x\n", b->number);
240
241 ln = &b->devices;
242 while (ln->next != &b->devices) {
243 d = pci_dev_b(ln->next);
244 if (d->devfn >= mirror) {
245 list_del(&d->global_list);
246 list_del(&d->bus_list);
247 kfree(d);
248 } else
249 ln = ln->next;
250 }
251}
252
253/*
254 * Discover remaining PCI buses in case there are peer host bridges. 202 * Discover remaining PCI buses in case there are peer host bridges.
255 * We use the number of last PCI bus provided by the PCI BIOS. 203 * We use the number of last PCI bus provided by the PCI BIOS.
256 */ 204 */
@@ -356,7 +304,6 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
356#if 0 304#if 0
357 printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number); 305 printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number);
358#endif 306#endif
359 pcibios_fixup_ghosts(bus);
360 pci_read_bridge_bases(bus); 307 pci_read_bridge_bases(bus);
361 308
362 if (bus->number == 0) { 309 if (bus->number == 0) {