diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-11-04 12:32:57 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-04 16:06:44 -0500 |
commit | 865df576e8fc70daf297b53e61a4fbefc719d065 (patch) | |
tree | 59abb13e1dd402bf8cb4496ab94bbceb2ac2ee2b /drivers/pci/probe.c | |
parent | 0207c356ef0e2bae6ce4603080d42c130d7debc6 (diff) |
PCI: improve discovery/configuration messages
This makes PCI resource management messages more consistent and adds a few
new messages to aid debugging.
Whenever we assign resources to a device, update a BAR, or change a
bridge aperture, it's worth noting it.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index a7fdc4344cef..623086f9ba84 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -226,7 +226,8 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
226 | goto fail; | 226 | goto fail; |
227 | 227 | ||
228 | if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) { | 228 | if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) { |
229 | dev_err(&dev->dev, "can't handle 64-bit BAR\n"); | 229 | dev_err(&dev->dev, "reg %x: can't handle 64-bit BAR\n", |
230 | pos); | ||
230 | goto fail; | 231 | goto fail; |
231 | } | 232 | } |
232 | 233 | ||
@@ -294,8 +295,11 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
294 | if (pci_is_root_bus(child)) /* It's a host bus, nothing to read */ | 295 | if (pci_is_root_bus(child)) /* It's a host bus, nothing to read */ |
295 | return; | 296 | return; |
296 | 297 | ||
298 | dev_info(&dev->dev, "PCI bridge to [bus %02x-%02x]%s\n", | ||
299 | child->secondary, child->subordinate, | ||
300 | dev->transparent ? " (subtractive decode)": ""); | ||
301 | |||
297 | if (dev->transparent) { | 302 | if (dev->transparent) { |
298 | dev_info(&dev->dev, "transparent bridge\n"); | ||
299 | for(i = 3; i < PCI_BUS_NUM_RESOURCES; i++) | 303 | for(i = 3; i < PCI_BUS_NUM_RESOURCES; i++) |
300 | child->resource[i] = child->parent->resource[i - 3]; | 304 | child->resource[i] = child->parent->resource[i - 3]; |
301 | } | 305 | } |
@@ -645,13 +649,14 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
645 | (child->number > bus->subordinate) || | 649 | (child->number > bus->subordinate) || |
646 | (child->number < bus->number) || | 650 | (child->number < bus->number) || |
647 | (child->subordinate < bus->number)) { | 651 | (child->subordinate < bus->number)) { |
648 | pr_debug("PCI: Bus #%02x (-#%02x) is %s " | 652 | dev_info(&child->dev, "[bus %02x-%02x] %s " |
649 | "hidden behind%s bridge #%02x (-#%02x)\n", | 653 | "hidden behind%s bridge %s [bus %02x-%02x]\n", |
650 | child->number, child->subordinate, | 654 | child->number, child->subordinate, |
651 | (bus->number > child->subordinate && | 655 | (bus->number > child->subordinate && |
652 | bus->subordinate < child->number) ? | 656 | bus->subordinate < child->number) ? |
653 | "wholly" : "partially", | 657 | "wholly" : "partially", |
654 | bus->self->transparent ? " transparent" : "", | 658 | bus->self->transparent ? " transparent" : "", |
659 | dev_name(&bus->dev), | ||
655 | bus->number, bus->subordinate); | 660 | bus->number, bus->subordinate); |
656 | } | 661 | } |
657 | bus = bus->parent; | 662 | bus = bus->parent; |