Lines Matching refs:ports
264 if (tb_is_upstream_port(&sw->ports[next_port])) in get_switch_at_route()
266 if (!sw->ports[next_port].remote) in get_switch_at_route()
268 return get_switch_at_route(sw->ports[next_port].remote->sw, in get_switch_at_route()
319 if (tb_is_upstream_port(&sw->ports[i])) in tb_switch_free()
321 if (sw->ports[i].remote) in tb_switch_free()
322 tb_switch_free(sw->ports[i].remote->sw); in tb_switch_free()
323 sw->ports[i].remote = NULL; in tb_switch_free()
329 kfree(sw->ports); in tb_switch_free()
382 sw->ports = kcalloc(sw->config.max_port_number + 1, sizeof(*sw->ports), in tb_switch_alloc()
384 if (!sw->ports) in tb_switch_alloc()
389 sw->ports[i].sw = sw; in tb_switch_alloc()
390 sw->ports[i].port = i; in tb_switch_alloc()
393 cap = tb_find_cap(&sw->ports[0], TB_CFG_SWITCH, TB_CAP_PLUG_EVENTS); in tb_switch_alloc()
406 if (sw->ports[i].disabled) { in tb_switch_alloc()
407 tb_port_info(&sw->ports[i], "disabled by eeprom\n"); in tb_switch_alloc()
410 if (tb_init_port(&sw->ports[i])) in tb_switch_alloc()
421 kfree(sw->ports); in tb_switch_alloc()
443 if (!tb_is_upstream_port(&sw->ports[i]) && sw->ports[i].remote) in tb_sw_set_unpplugged()
444 tb_sw_set_unpplugged(sw->ports[i].remote->sw); in tb_sw_set_unpplugged()
477 struct tb_port *port = &sw->ports[i]; in tb_switch_resume()
500 if (!tb_is_upstream_port(&sw->ports[i]) && sw->ports[i].remote) in tb_switch_suspend()
501 tb_switch_suspend(sw->ports[i].remote->sw); in tb_switch_suspend()