This patch prevents the root bridge drivers from using the legacy API.
It also updates the PCI<->PCI bridge driver to better coexist with the
legacy code.

Signed-off-by: Adam Belay <[EMAIL PROTECTED]>

--- a/drivers/pci/bus/pci-bridge.c      2005-07-14 02:17:04.735566464 -0400
+++ b/drivers/pci/bus/pci-bridge.c      2005-07-14 02:24:29.577940144 -0400
@@ -128,6 +128,10 @@
        if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE)
                return -ENODEV;
 
+       /* don't bind to devices controlled by legacy code */
+       if (dev->subordinate)
+               return -ENODEV;
+
        bus = ppb_detect_bus(dev);
        if (!bus)
                return -ENODEV;
--- a/drivers/pci/bus/probe.c   2005-07-14 02:26:30.660532792 -0400
+++ b/drivers/pci/bus/probe.c   2005-07-14 02:25:20.455205624 -0400
@@ -395,6 +395,7 @@
 struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int 
bus, struct pci_ops *ops, void *sysdata)
 {
        int error;
+       unsigned int devfn;
        struct pci_bus *b;
        struct device *dev;
 
@@ -440,7 +441,9 @@
        /* Create legacy_io and legacy_mem files for this bus */
        pci_create_legacy_files(b);
 
-       b->subordinate = pci_scan_child_bus(b);
+       /* Go find them, Rover! */
+       for (devfn = 0; devfn < 0x100; devfn += 8)
+               pci_scan_slot(b, devfn);
 
        return b;
 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to