aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorVincent Legoll <vincent.legoll@gmail.com>2008-10-12 06:26:12 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-20 14:01:45 -0400
commitf393d9b130423a7a47c751b26df07ceaa5dc76a9 (patch)
treec29cada52d6fce41d90a03c371861a7034cdded8 /drivers/pci
parent58c3a727cb73b75a9104d295f096cca12959a5a5 (diff)
PCI: probing debug message uniformization
This patch uniformizes PCI probing debug boot messages with dev_printk() intead of manual printk() It changes adress range output from [%llx, %llx] to [%#llx-%#llx], like in pci_request_region(). For example, it goes from the mixed-style: PCI: 0000:00:1b.0 reg 10 64bit mmio: [f4280000, f4283fff] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold to uniform: pci 0000:00:1b.0: reg 10 64bit mmio: [0xf4280000-0xf4283fff] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold This patch has been runtime tested, boot log messages diffed, everything looks OK. Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/aspm.c6
-rw-r--r--drivers/pci/probe.c25
2 files changed, 15 insertions, 16 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 851f5b83cdbc..8f63f4c6b85f 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -528,9 +528,9 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
528 pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP, 528 pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP,
529 &reg32); 529 &reg32);
530 if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) { 530 if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) {
531 printk("Pre-1.1 PCIe device detected, " 531 dev_printk(KERN_INFO, &child_dev->dev, "disabling ASPM"
532 "disable ASPM for %s. It can be enabled forcedly" 532 " on pre-1.1 PCIe device. You can enable it"
533 " with 'pcie_aspm=force'\n", pci_name(pdev)); 533 " with 'pcie_aspm=force'\n");
534 return -EINVAL; 534 return -EINVAL;
535 } 535 }
536 } 536 }
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 3141e8deeac4..afb9f1c0bc28 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -302,8 +302,8 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
302 } else { 302 } else {
303 res->start = l64; 303 res->start = l64;
304 res->end = l64 + sz64; 304 res->end = l64 + sz64;
305 printk(KERN_DEBUG "PCI: %s reg %x 64bit mmio: %pR\n", 305 dev_printk(KERN_DEBUG, &dev->dev,
306 pci_name(dev), pos, res); 306 "reg %x 64bit mmio: %pR\n", pos, res);
307 } 307 }
308 } else { 308 } else {
309 sz = pci_size(l, sz, mask); 309 sz = pci_size(l, sz, mask);
@@ -313,10 +313,10 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
313 313
314 res->start = l; 314 res->start = l;
315 res->end = l + sz; 315 res->end = l + sz;
316 printk(KERN_DEBUG "PCI: %s reg %x %s: %pR\n", 316
317 pci_name(dev), pos, 317 dev_printk(KERN_DEBUG, &dev->dev, "reg %x %s: %pR\n", pos,
318 (res->flags & IORESOURCE_IO) ? "io port":"32bit mmio", 318 (res->flags & IORESOURCE_IO) ? "io port" : "32bit mmio",
319 res); 319 res);
320 } 320 }
321 321
322 out: 322 out:
@@ -387,8 +387,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
387 res->start = base; 387 res->start = base;
388 if (!res->end) 388 if (!res->end)
389 res->end = limit + 0xfff; 389 res->end = limit + 0xfff;
390 printk(KERN_DEBUG "PCI: bridge %s io port: %pR\n", 390 dev_printk(KERN_DEBUG, &dev->dev, "bridge io port: %pR\n", res);
391 pci_name(dev), res);
392 } 391 }
393 392
394 res = child->resource[1]; 393 res = child->resource[1];
@@ -400,8 +399,8 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
400 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; 399 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
401 res->start = base; 400 res->start = base;
402 res->end = limit + 0xfffff; 401 res->end = limit + 0xfffff;
403 printk(KERN_DEBUG "PCI: bridge %s 32bit mmio: %pR\n", 402 dev_printk(KERN_DEBUG, &dev->dev, "bridge 32bit mmio: %pR\n",
404 pci_name(dev), res); 403 res);
405 } 404 }
406 405
407 res = child->resource[2]; 406 res = child->resource[2];
@@ -437,9 +436,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
437 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; 436 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
438 res->start = base; 437 res->start = base;
439 res->end = limit + 0xfffff; 438 res->end = limit + 0xfffff;
440 printk(KERN_DEBUG "PCI: bridge %s %sbit mmio pref: %pR\n", 439 dev_printk(KERN_DEBUG, &dev->dev, "bridge %sbit mmio pref: %pR\n",
441 pci_name(dev), 440 (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32",
442 (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64":"32", res); 441 res);
443 } 442 }
444} 443}
445 444