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>
This commit is contained in:
committed by
Jesse Barnes
parent
0207c356ef
commit
865df576e8
+9
-4
@@ -226,7 +226,8 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
|
||||
goto fail;
|
||||
|
||||
if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) {
|
||||
dev_err(&dev->dev, "can't handle 64-bit BAR\n");
|
||||
dev_err(&dev->dev, "reg %x: can't handle 64-bit BAR\n",
|
||||
pos);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -294,8 +295,11 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
|
||||
if (pci_is_root_bus(child)) /* It's a host bus, nothing to read */
|
||||
return;
|
||||
|
||||
dev_info(&dev->dev, "PCI bridge to [bus %02x-%02x]%s\n",
|
||||
child->secondary, child->subordinate,
|
||||
dev->transparent ? " (subtractive decode)": "");
|
||||
|
||||
if (dev->transparent) {
|
||||
dev_info(&dev->dev, "transparent bridge\n");
|
||||
for(i = 3; i < PCI_BUS_NUM_RESOURCES; i++)
|
||||
child->resource[i] = child->parent->resource[i - 3];
|
||||
}
|
||||
@@ -645,13 +649,14 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
|
||||
(child->number > bus->subordinate) ||
|
||||
(child->number < bus->number) ||
|
||||
(child->subordinate < bus->number)) {
|
||||
pr_debug("PCI: Bus #%02x (-#%02x) is %s "
|
||||
"hidden behind%s bridge #%02x (-#%02x)\n",
|
||||
dev_info(&child->dev, "[bus %02x-%02x] %s "
|
||||
"hidden behind%s bridge %s [bus %02x-%02x]\n",
|
||||
child->number, child->subordinate,
|
||||
(bus->number > child->subordinate &&
|
||||
bus->subordinate < child->number) ?
|
||||
"wholly" : "partially",
|
||||
bus->self->transparent ? " transparent" : "",
|
||||
dev_name(&bus->dev),
|
||||
bus->number, bus->subordinate);
|
||||
}
|
||||
bus = bus->parent;
|
||||
|
||||
Reference in New Issue
Block a user