PCI: re-add debug prints for unmodified BARs
authorYinghai Lu <yhlu.kernel@gmail.com>
Tue, 9 Sep 2008 19:27:52 +0000 (12:27 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 12 Sep 2008 23:34:46 +0000 (16:34 -0700)
Print out for device BAR values before the kernel tries to update them.
Also make related output use KERN_DEBUG.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/probe.c

index 0ad936765b26d1f85aec4e3d4061be3d482d68ff..36698e57b97f659dbc20f03f4f6df6fe0e718694 100644 (file)
@@ -304,6 +304,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
                } else {
                        res->start = l64;
                        res->end = l64 + sz64;
+                       printk(KERN_DEBUG "PCI: %s reg %x 64bit mmio: [%llx, %llx]\n",
+                               pci_name(dev), pos, (unsigned long long)res->start,
+                               (unsigned long long)res->end);
                }
        } else {
                sz = pci_size(l, sz, mask);
@@ -313,6 +316,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
 
                res->start = l;
                res->end = l + sz;
+               printk(KERN_DEBUG "PCI: %s reg %x %s: [%llx, %llx]\n", pci_name(dev),
+                       pos, (res->flags & IORESOURCE_IO) ? "io port":"32bit mmio",
+                       (unsigned long long)res->start, (unsigned long long)res->end);
        }
 
  out:
@@ -383,7 +389,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                        res->start = base;
                if (!res->end)
                        res->end = limit + 0xfff;
-               printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n",
+               printk(KERN_DEBUG "PCI: bridge %s io port: [%llx, %llx]\n",
                        pci_name(dev), (unsigned long long) res->start,
                        (unsigned long long) res->end);
        }
@@ -397,8 +403,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
                res->start = base;
                res->end = limit + 0xfffff;
-               printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev),
-                       (unsigned long long) res->start, (unsigned long long) res->end);
+               printk(KERN_DEBUG "PCI: bridge %s 32bit mmio: [%llx, %llx]\n",
+                       pci_name(dev), (unsigned long long) res->start,
+                       (unsigned long long) res->end);
        }
 
        res = child->resource[2];
@@ -434,7 +441,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
                res->start = base;
                res->end = limit + 0xfffff;
-               printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n",
+               printk(KERN_DEBUG "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n",
                        pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32",
                        (unsigned long long) res->start, (unsigned long long) res->end);
        }