Lines Matching refs:parent_sw

565 static struct tb_switch *add_switch(struct tb_switch *parent_sw, u64 route,  in add_switch()  argument
576 pm_runtime_get_sync(&parent_sw->dev); in add_switch()
578 sw = tb_switch_alloc(parent_sw->tb, &parent_sw->dev, route); in add_switch()
602 tb_port_at(route, parent_sw)->remote = tb_upstream_port(sw); in add_switch()
603 tb_upstream_port(sw)->remote = tb_port_at(route, parent_sw); in add_switch()
607 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in add_switch()
613 pm_runtime_mark_last_busy(&parent_sw->dev); in add_switch()
614 pm_runtime_put_autosuspend(&parent_sw->dev); in add_switch()
619 static void update_switch(struct tb_switch *parent_sw, struct tb_switch *sw, in update_switch() argument
624 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in update_switch()
626 tb_port_at(route, parent_sw)->remote = tb_upstream_port(sw); in update_switch()
646 struct tb_switch *parent_sw; in remove_switch() local
648 parent_sw = tb_to_switch(sw->dev.parent); in remove_switch()
649 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in remove_switch()
699 struct tb_switch *sw, *parent_sw; in icm_fr_device_connected() local
728 parent_sw = tb_to_switch(sw->dev.parent); in icm_fr_device_connected()
758 update_switch(parent_sw, sw, route, pkg->connection_id, in icm_fr_device_connected()
799 parent_sw = tb_switch_find_by_link_depth(tb, link, depth - 1); in icm_fr_device_connected()
800 if (!parent_sw) { in icm_fr_device_connected()
810 tb_switch_put(parent_sw); in icm_fr_device_connected()
814 add_switch(parent_sw, route, &pkg->ep_uuid, (const u8 *)pkg->ep_name, in icm_fr_device_connected()
819 tb_switch_put(parent_sw); in icm_fr_device_connected()
1146 struct tb_switch *sw, *parent_sw; in __icm_tr_device_connected() local
1177 parent_sw = tb_to_switch(sw->dev.parent); in __icm_tr_device_connected()
1178 update_switch(parent_sw, sw, route, pkg->connection_id, in __icm_tr_device_connected()
1202 parent_sw = tb_switch_find_by_route(tb, get_parent_route(route)); in __icm_tr_device_connected()
1203 if (!parent_sw) { in __icm_tr_device_connected()
1208 sw = add_switch(parent_sw, route, &pkg->ep_uuid, (const u8 *)pkg->ep_name, in __icm_tr_device_connected()
1214 tb_switch_put(parent_sw); in __icm_tr_device_connected()