+
+ /* Append additional bridges reported by libpci via d->parent */
+
+ for (d=first_dev; d; d=d->next)
+ {
+ struct device *parent = NULL;
+ if (d->dev->known_fields & PCI_FILL_PARENT)
+ parent = find_device(d->dev->parent);
+ if (!parent || parent->bridge)
+ continue;
+ b = xmalloc(sizeof(struct bridge));
+ b->domain = parent->dev->domain;
+ b->primary = parent->dev->bus;
+ b->secondary = d->dev->bus;
+ /* At this stage subordinate number is unknown, so set it to secondary bus number. */
+ b->subordinate = b->secondary;
+ *last_br = b;
+ last_br = &b->chain;
+ b->prev = b->next = b->child = NULL;
+ b->first_bus = NULL;
+ b->last_bus = NULL;
+ b->br_dev = parent;
+ parent->bridge = b;
+ pacc->debug("Tree: bridge %04x:%02x:%02x.%d\n", b->domain,
+ parent->dev->bus, parent->dev->dev, parent->dev->func);
+ }