Lines Matching refs:tb
43 static void tb_dump_port(struct tb *tb, struct tb_regs_port_header *port) in tb_dump_port() argument
45 tb_info(tb, in tb_dump_port()
50 tb_info(tb, " Max hop id (in/out): %d/%d\n", in tb_dump_port()
52 tb_info(tb, " Max counters: %d\n", port->max_counters); in tb_dump_port()
53 tb_info(tb, " NFC Credits: %#x\n", port->nfc_credits); in tb_dump_port()
203 tb_dump_port(port->sw->tb, &port->config); in tb_init_port()
212 static void tb_dump_switch(struct tb *tb, struct tb_regs_switch_header *sw) in tb_dump_switch() argument
214 tb_info(tb, in tb_dump_switch()
218 tb_info(tb, " Max Port Number: %d\n", sw->max_port_number); in tb_dump_switch()
219 tb_info(tb, " Config:\n"); in tb_dump_switch()
220 tb_info(tb, in tb_dump_switch()
225 tb_info(tb, in tb_dump_switch()
235 int tb_switch_reset(struct tb *tb, u64 route) in tb_switch_reset() argument
243 tb_info(tb, "resetting switch at %llx\n", route); in tb_switch_reset()
244 res.err = tb_cfg_write(tb->ctl, ((u32 *) &header) + 2, route, in tb_switch_reset()
248 res = tb_cfg_reset(tb->ctl, route, TB_CFG_DEFAULT_TIMEOUT); in tb_switch_reset()
339 struct tb_switch *tb_switch_alloc(struct tb *tb, u64 route) in tb_switch_alloc() argument
344 int upstream_port = tb_cfg_get_upstream_port(tb->ctl, route); in tb_switch_alloc()
352 sw->tb = tb; in tb_switch_alloc()
353 if (tb_cfg_read(tb->ctl, &sw->config, route, 0, 2, 0, 5)) in tb_switch_alloc()
355 tb_info(tb, in tb_switch_alloc()
358 tb_info(tb, "old switch config:\n"); in tb_switch_alloc()
359 tb_dump_switch(tb, &sw->config); in tb_switch_alloc()
433 if (sw == sw->tb->root_switch) { in tb_sw_set_unpplugged()