#include "lspci.h"
-struct bridge host_bridge = { NULL, NULL, NULL, NULL, NULL, 0, ~0, 0, ~0, NULL };
+struct bridge host_bridge = { NULL, NULL, NULL, NULL, NULL, NULL, ~0, ~0, ~0, ~0, NULL };
static struct bus *
find_bus(struct bridge *b, unsigned int domain, unsigned int n)
b->subordinate = ~0;
*last_br = b;
last_br = &b->chain;
- b->prev = b->child = NULL;
+ b->prev = b->next = b->child = NULL;
b->first_bus = NULL;
b->last_bus = NULL;
b->br_dev = NULL;
}
*last_br = b;
last_br = &b->chain;
- b->prev = b->child = NULL;
+ b->prev = b->next = b->child = NULL;
b->first_bus = NULL;
b->last_bus = NULL;
b->br_dev = d;
b->subordinate = b->secondary;
*last_br = b;
last_br = &b->chain;
- b->prev = b->child = NULL;
+ b->prev = b->next = b->child = NULL;
b->first_bus = NULL;
b->last_bus = NULL;
b->br_dev = parent;
if (host_bridge.child)
{
for (b=host_bridge.child; b->prev; b=b->prev)
+ b->prev->next = b;
+ for (; b; b=b->next)
show_tree_bridge(filter, b, line, line);
}
}
struct bridge {
struct bridge *chain; /* Single-linked list of bridges */
- struct bridge *prev, *child; /* Tree of bridges */
+ struct bridge *next, *prev, *child; /* Tree of bridges */
struct bus *first_bus, *last_bus; /* List of buses connected to this bridge */
unsigned int domain;
unsigned int primary, secondary, subordinate; /* Bus numbers */