summaryrefslogtreecommitdiff
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2011-10-28 16:25:40 -0600
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-01-06 12:10:51 -0800
commita9d9f5276cb3fa08351e8837ab9398bfd8e69a2e (patch)
treec23406ab8668e176bcb0bdf15d201ce3afc4613b /drivers/pci/probe.c
parent45ca9e9730c5acdb482dd95799fd8ac834481897 (diff)
PCI: show host bridges and root bus resources
Show the bus number and resources for every root bus we create. This will become more interesting when we supply the correct resources instead of using the defaults (ioport_resource and iomem_resource). Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index d5d0ab810f79..2f0b14451d9d 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1525,9 +1525,10 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
struct pci_bus * pci_create_bus(struct device *parent,
int bus, struct pci_ops *ops, void *sysdata)
{
- int error;
+ int error, i;
struct pci_bus *b, *b2;
struct device *dev;
+ struct resource *res;
b = pci_alloc_bus();
if (!b)
@@ -1580,6 +1581,16 @@ struct pci_bus * pci_create_bus(struct device *parent,
b->resource[0] = &ioport_resource;
b->resource[1] = &iomem_resource;
+ if (parent)
+ dev_info(parent, "PCI host bridge to bus %s\n", dev_name(&b->dev));
+ else
+ printk(KERN_INFO "PCI host bridge to bus %s\n", dev_name(&b->dev));
+
+ pci_bus_for_each_resource(b, res, i) {
+ if (res)
+ dev_info(&b->dev, "root bus resource %pR\n", res);
+ }
+
return b;
class_dev_reg_err: