aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-09-09 15:27:52 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-09-12 19:34:46 -0400
commit395a125c6237802b19bf22b41017c99ff57f1024 (patch)
tree9a2ca5bf2508fa865ab1ed973a997f15eb2be419 /drivers
parenta5827f40afafc864f57a1c44915f0bfaf3d94f53 (diff)
PCI: re-add debug prints for unmodified BARs
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/probe.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 0ad936765b26..36698e57b97f 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -304,6 +304,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
304 } else { 304 } else {
305 res->start = l64; 305 res->start = l64;
306 res->end = l64 + sz64; 306 res->end = l64 + sz64;
307 printk(KERN_DEBUG "PCI: %s reg %x 64bit mmio: [%llx, %llx]\n",
308 pci_name(dev), pos, (unsigned long long)res->start,
309 (unsigned long long)res->end);
307 } 310 }
308 } else { 311 } else {
309 sz = pci_size(l, sz, mask); 312 sz = pci_size(l, sz, mask);
@@ -313,6 +316,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
313 316
314 res->start = l; 317 res->start = l;
315 res->end = l + sz; 318 res->end = l + sz;
319 printk(KERN_DEBUG "PCI: %s reg %x %s: [%llx, %llx]\n", pci_name(dev),
320 pos, (res->flags & IORESOURCE_IO) ? "io port":"32bit mmio",
321 (unsigned long long)res->start, (unsigned long long)res->end);
316 } 322 }
317 323
318 out: 324 out:
@@ -383,7 +389,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
383 res->start = base; 389 res->start = base;
384 if (!res->end) 390 if (!res->end)
385 res->end = limit + 0xfff; 391 res->end = limit + 0xfff;
386 printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", 392 printk(KERN_DEBUG "PCI: bridge %s io port: [%llx, %llx]\n",
387 pci_name(dev), (unsigned long long) res->start, 393 pci_name(dev), (unsigned long long) res->start,
388 (unsigned long long) res->end); 394 (unsigned long long) res->end);
389 } 395 }
@@ -397,8 +403,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
397 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; 403 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
398 res->start = base; 404 res->start = base;
399 res->end = limit + 0xfffff; 405 res->end = limit + 0xfffff;
400 printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev), 406 printk(KERN_DEBUG "PCI: bridge %s 32bit mmio: [%llx, %llx]\n",
401 (unsigned long long) res->start, (unsigned long long) res->end); 407 pci_name(dev), (unsigned long long) res->start,
408 (unsigned long long) res->end);
402 } 409 }
403 410
404 res = child->resource[2]; 411 res = child->resource[2];
@@ -434,7 +441,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
434 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; 441 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
435 res->start = base; 442 res->start = base;
436 res->end = limit + 0xfffff; 443 res->end = limit + 0xfffff;
437 printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n", 444 printk(KERN_DEBUG "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n",
438 pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32", 445 pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32",
439 (unsigned long long) res->start, (unsigned long long) res->end); 446 (unsigned long long) res->start, (unsigned long long) res->end);
440 } 447 }