bogus changes for generic pci_scan_slot() in ameslab-2.5
Olaf Hering
olh at suse.de
Sat Nov 29 02:41:51 EST 2003
Good morning,
what is the purpose of this change?
diff -purN linux-2.5/drivers/pci/probe.c linuxppc64-2.5/drivers/pci/probe.c
--- linux-2.5/drivers/pci/probe.c 2003-08-06 15:34:30.000000000 +0000
+++ linuxppc64-2.5/drivers/pci/probe.c 2003-11-05 22:12:33.000000000 +0000
@@ -552,6 +552,7 @@ int __devinit pci_scan_slot(struct pci_b
struct pci_dev *dev;
dev = pci_scan_device(bus, devfn);
+#if 0
if (func == 0) {
if (!dev)
break;
@@ -560,6 +561,10 @@ int __devinit pci_scan_slot(struct pci_b
continue;
dev->multifunction = 1;
}
+#else
+ if (!dev)
+ continue;
+#endif
/* Fix up broken headers */
pci_fixup_device(PCI_FIXUP_HEADER, dev);
It breaks on ppc32, B&W G3, dies in indirect_read_config() because the
pointer *cfg_data becomes bogus, devfn is > 0xff (no idea if that
matters).
turning #if 0 into #if 1 cures it. I havent tried it on other systems
yet, but at least a PReP MTX+ works with the patch above.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list