]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PCI: Improve "partially hidden behind bridge" log message
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 24 May 2018 18:23:52 +0000 (13:23 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 4 Jun 2018 17:08:06 +0000 (12:08 -0500)
pci_scan_child_bus_extend() complains when we assign an unreachable
secondary bus number to a bridge.  For example, given the topology below:

  +-1b.0-[01-39]----00.0-[02-3a]--+-00.0-[03]----00.0
                                  +-01.0-[04-39]--
                                  \-02.0-[3a]----00.0

it logs the following messages:

  pci_bus 0000:3a: [bus 3a] partially hidden behind bridge 0000:02 [bus 02-39]
  pci_bus 0000:3a: [bus 3a] partially hidden behind bridge 0000:01 [bus 01-39]

These messages are incorrect (0000:02 is a bus, not a bridge) and
confusing.  Make the message more understandable:

  pci 0000:02:02.0: devices behind bridge are unusable because [bus 3a] cannot be assigned for them

Also, remove the reference to CardBus, because this issue affects all
varieties of PCI, not just CardBus.

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/probe.c

index fe5b05bd18877f833976116b22761b8e508d304f..3100ede3a5bf75b8bdfe658c1479e730d48f133c 100644 (file)
@@ -1191,20 +1191,15 @@ static int pci_scan_bridge_extend(struct pci_bus *bus, struct pci_dev *dev,
                (is_cardbus ? "PCI CardBus %04x:%02x" : "PCI Bus %04x:%02x"),
                pci_domain_nr(bus), child->number);
 
-       /* Has only triggered on CardBus, fixup is in yenta_socket */
+       /* Check that all devices are accessible */
        while (bus->parent) {
                if ((child->busn_res.end > bus->busn_res.end) ||
                    (child->number > bus->busn_res.end) ||
                    (child->number < bus->number) ||
                    (child->busn_res.end < bus->number)) {
-                       dev_info(&child->dev, "%pR %s hidden behind%s bridge %s %pR\n",
-                               &child->busn_res,
-                               (bus->number > child->busn_res.end &&
-                                bus->busn_res.end < child->number) ?
-                                       "wholly" : "partially",
-                               bus->self->transparent ? " transparent" : "",
-                               dev_name(&bus->dev),
-                               &bus->busn_res);
+                       dev_info(&dev->dev, "devices behind bridge are unusable because %pR cannot be assigned for them\n",
+                                &child->busn_res);
+                       break;
                }
                bus = bus->parent;
        }