• Bjorn Helgaas's avatar
    PCI: Log bridge info when first enumerating bridge · 95140c2f
    Bjorn Helgaas authored
    Log bridge secondary/subordinate bus and window information at the same
    time we log the bridge BARs, just after discovering the bridge and before
    scanning the bridge's secondary bus.  This logs the bridge and downstream
    devices in a more logical order:
    
      - pci 0000:00:01.0: [8086:1901] type 01 class 0x060400
      - pci 0000:01:00.0: [10de:13b6] type 00 class 0x030200
      - pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff]
      - pci 0000:00:01.0: PCI bridge to [bus 01]
      - pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
    
      + pci 0000:00:01.0: [8086:1901] type 01 class 0x060400
      + pci 0000:00:01.0: PCI bridge to [bus 01]
      + pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
      + pci 0000:01:00.0: [10de:13b6] type 00 class 0x030200
      + pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff]
    
    Note that we read the windows into a temporary struct resource that is
    thrown away, not into the resources in the struct pci_bus.
    
    The windows may be adjusted after we know what downstream devices require,
    and those adjustments are logged as they are made.
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    95140c2f
probe.c 87.6 KB