Lines Matching refs:parent_sw
463 static void add_switch(struct tb_switch *parent_sw, u64 route, in add_switch() argument
472 pm_runtime_get_sync(&parent_sw->dev); in add_switch()
474 sw = tb_switch_alloc(parent_sw->tb, &parent_sw->dev, route); in add_switch()
492 tb_port_at(route, parent_sw)->remote = tb_upstream_port(sw); in add_switch()
493 tb_upstream_port(sw)->remote = tb_port_at(route, parent_sw); in add_switch()
496 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in add_switch()
501 pm_runtime_mark_last_busy(&parent_sw->dev); in add_switch()
502 pm_runtime_put_autosuspend(&parent_sw->dev); in add_switch()
505 static void update_switch(struct tb_switch *parent_sw, struct tb_switch *sw, in update_switch() argument
510 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in update_switch()
512 tb_port_at(route, parent_sw)->remote = tb_upstream_port(sw); in update_switch()
529 struct tb_switch *parent_sw; in remove_switch() local
531 parent_sw = tb_to_switch(sw->dev.parent); in remove_switch()
532 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in remove_switch()
582 struct tb_switch *sw, *parent_sw; in icm_fr_device_connected() local
609 parent_sw = tb_to_switch(sw->dev.parent); in icm_fr_device_connected()
639 update_switch(parent_sw, sw, route, pkg->connection_id, in icm_fr_device_connected()
680 parent_sw = tb_switch_find_by_link_depth(tb, link, depth - 1); in icm_fr_device_connected()
681 if (!parent_sw) { in icm_fr_device_connected()
691 tb_switch_put(parent_sw); in icm_fr_device_connected()
695 add_switch(parent_sw, route, &pkg->ep_uuid, (const u8 *)pkg->ep_name, in icm_fr_device_connected()
700 tb_switch_put(parent_sw); in icm_fr_device_connected()
1019 struct tb_switch *sw, *parent_sw; in icm_tr_device_connected() local
1048 parent_sw = tb_to_switch(sw->dev.parent); in icm_tr_device_connected()
1049 update_switch(parent_sw, sw, route, pkg->connection_id, in icm_tr_device_connected()
1073 parent_sw = tb_switch_find_by_route(tb, get_parent_route(route)); in icm_tr_device_connected()
1074 if (!parent_sw) { in icm_tr_device_connected()
1079 add_switch(parent_sw, route, &pkg->ep_uuid, (const u8 *)pkg->ep_name, in icm_tr_device_connected()
1083 tb_switch_put(parent_sw); in icm_tr_device_connected()