Commit a9d96a6e authored by Russell King's avatar Russell King

[PCI] pci-6 - Fix scanning of non-zero functions

Fix breakage in pci-3 - we scanned all functions if function 0 was not
present.  This causes some host bridges to lock up when scanning devfn
255 on PPC machines.
parent bda2dabe
...@@ -520,11 +520,14 @@ int __devinit pci_scan_slot(struct pci_bus *bus, int devfn) ...@@ -520,11 +520,14 @@ int __devinit pci_scan_slot(struct pci_bus *bus, int devfn)
struct pci_dev *dev; struct pci_dev *dev;
dev = pci_scan_device(bus, devfn); dev = pci_scan_device(bus, devfn);
if (func == 0) {
if (!dev)
break;
} else {
if (!dev) if (!dev)
continue; continue;
if (func != 0)
dev->multifunction = 1; dev->multifunction = 1;
}
/* Fix up broken headers */ /* Fix up broken headers */
pci_fixup_device(PCI_FIXUP_HEADER, dev); pci_fixup_device(PCI_FIXUP_HEADER, dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment