]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
PCI: read bridge windows before filling in subtractive decode resources
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Tue, 23 Feb 2010 17:24:26 +0000 (10:24 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 23 Feb 2010 17:43:25 +0000 (09:43 -0800)
No functional change; this fills in the bus subtractive decode resources
after reading the bridge window information rather than before.  Also,
print out the subtractive decode resources as we already do for the
positive decode windows.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/probe.c

index 4b47b4bfb066f787dc9dc7bf49285cdbf7a1e089..70c4ed2e67cc7828b38699fbe5ef7638e4e468d6 100644 (file)
@@ -403,14 +403,19 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                 child->secondary, child->subordinate,
                 dev->transparent ? " (subtractive decode)" : "");
 
-       if (dev->transparent) {
-               for (i = 3; i < PCI_BUS_NUM_RESOURCES; i++)
-                       child->resource[i] = child->parent->resource[i - 3];
-       }
-
        pci_read_bridge_io(child);
        pci_read_bridge_mmio(child);
        pci_read_bridge_mmio_pref(child);
+
+       if (dev->transparent) {
+               for (i = 3; i < PCI_BUS_NUM_RESOURCES; i++) {
+                       child->resource[i] = child->parent->resource[i - 3];
+                       if (child->resource[i])
+                               dev_printk(KERN_DEBUG, &dev->dev,
+                                          "  bridge window %pR (subtractive decode)\n",
+                                          child->resource[i]);
+               }
+       }
 }
 
 static struct pci_bus * pci_alloc_bus(void)