aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/setup-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r--drivers/pci/setup-bus.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index ed6916bac675..502d1704c533 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -74,8 +74,8 @@ void pci_setup_cardbus(struct pci_bus *bus)
74 struct resource *res; 74 struct resource *res;
75 struct pci_bus_region region; 75 struct pci_bus_region region;
76 76
77 dev_info(&bridge->dev, "CardBus bridge, secondary bus %04x:%02x\n", 77 dev_info(&bridge->dev, "CardBus bridge to [bus %02x-%02x]\n",
78 pci_domain_nr(bus), bus->number); 78 bus->secondary, bus->subordinate);
79 79
80 res = bus->resource[0]; 80 res = bus->resource[0];
81 pcibios_resource_to_bus(bridge, &region, res); 81 pcibios_resource_to_bus(bridge, &region, res);
@@ -145,8 +145,8 @@ static void pci_setup_bridge(struct pci_bus *bus)
145 if (pci_is_enabled(bridge)) 145 if (pci_is_enabled(bridge))
146 return; 146 return;
147 147
148 dev_info(&bridge->dev, "PCI bridge, secondary bus %04x:%02x\n", 148 dev_info(&bridge->dev, "PCI bridge to [bus %02x-%02x]\n",
149 pci_domain_nr(bus), bus->number); 149 bus->secondary, bus->subordinate);
150 150
151 /* Set up the top and bottom of the PCI I/O segment for this bus. */ 151 /* Set up the top and bottom of the PCI I/O segment for this bus. */
152 res = bus->resource[0]; 152 res = bus->resource[0];
@@ -338,6 +338,10 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t min_size)
338#endif 338#endif
339 size = ALIGN(size + size1, 4096); 339 size = ALIGN(size + size1, 4096);
340 if (!size) { 340 if (!size) {
341 if (b_res->start || b_res->end)
342 dev_info(&bus->self->dev, "disabling bridge window "
343 "%pR to [bus %02x-%02x] (unused)\n", b_res,
344 bus->secondary, bus->subordinate);
341 b_res->flags = 0; 345 b_res->flags = 0;
342 return; 346 return;
343 } 347 }
@@ -383,8 +387,9 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
383 align = pci_resource_alignment(dev, r); 387 align = pci_resource_alignment(dev, r);
384 order = __ffs(align) - 20; 388 order = __ffs(align) - 20;
385 if (order > 11) { 389 if (order > 11) {
386 dev_warn(&dev->dev, "BAR %d: bad alignment %llx: " 390 dev_warn(&dev->dev, "disabling BAR %d: %pR "
387 "%pR\n", i, (unsigned long long)align, r); 391 "(bad alignment %#llx)\n", i, r,
392 (unsigned long long) align);
388 r->flags = 0; 393 r->flags = 0;
389 continue; 394 continue;
390 } 395 }
@@ -418,6 +423,10 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
418 } 423 }
419 size = ALIGN(size, min_align); 424 size = ALIGN(size, min_align);
420 if (!size) { 425 if (!size) {
426 if (b_res->start || b_res->end)
427 dev_info(&bus->self->dev, "disabling bridge window "
428 "%pR to [bus %02x-%02x] (unused)\n", b_res,
429 bus->secondary, bus->subordinate);
421 b_res->flags = 0; 430 b_res->flags = 0;
422 return 1; 431 return 1;
423 } 432 }