Lines Matching refs:parent_sw

609 static struct tb_switch *alloc_switch(struct tb_switch *parent_sw, u64 route,  in alloc_switch()  argument
612 struct tb *tb = parent_sw->tb; in alloc_switch()
615 sw = tb_switch_alloc(tb, &parent_sw->dev, route); in alloc_switch()
631 static int add_switch(struct tb_switch *parent_sw, struct tb_switch *sw) in add_switch() argument
637 tb_port_at(route, parent_sw)->remote = tb_upstream_port(sw); in add_switch()
638 tb_upstream_port(sw)->remote = tb_port_at(route, parent_sw); in add_switch()
642 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in add_switch()
647 static void update_switch(struct tb_switch *parent_sw, struct tb_switch *sw, in update_switch() argument
652 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in update_switch()
654 tb_port_at(route, parent_sw)->remote = tb_upstream_port(sw); in update_switch()
674 struct tb_switch *parent_sw; in remove_switch() local
676 parent_sw = tb_to_switch(sw->dev.parent); in remove_switch()
677 tb_port_at(tb_route(sw), parent_sw)->remote = NULL; in remove_switch()
727 struct tb_switch *sw, *parent_sw; in icm_fr_device_connected() local
758 parent_sw = tb_to_switch(sw->dev.parent); in icm_fr_device_connected()
788 update_switch(parent_sw, sw, route, pkg->connection_id, in icm_fr_device_connected()
829 parent_sw = tb_switch_find_by_link_depth(tb, link, depth - 1); in icm_fr_device_connected()
830 if (!parent_sw) { in icm_fr_device_connected()
840 tb_switch_put(parent_sw); in icm_fr_device_connected()
844 pm_runtime_get_sync(&parent_sw->dev); in icm_fr_device_connected()
846 sw = alloc_switch(parent_sw, route, &pkg->ep_uuid); in icm_fr_device_connected()
859 if (add_switch(parent_sw, sw)) in icm_fr_device_connected()
863 pm_runtime_mark_last_busy(&parent_sw->dev); in icm_fr_device_connected()
864 pm_runtime_put_autosuspend(&parent_sw->dev); in icm_fr_device_connected()
866 tb_switch_put(parent_sw); in icm_fr_device_connected()
1207 struct tb_switch *sw, *parent_sw; in __icm_tr_device_connected() local
1239 parent_sw = tb_to_switch(sw->dev.parent); in __icm_tr_device_connected()
1240 update_switch(parent_sw, sw, route, pkg->connection_id, in __icm_tr_device_connected()
1264 parent_sw = tb_switch_find_by_route(tb, get_parent_route(route)); in __icm_tr_device_connected()
1265 if (!parent_sw) { in __icm_tr_device_connected()
1270 pm_runtime_get_sync(&parent_sw->dev); in __icm_tr_device_connected()
1272 sw = alloc_switch(parent_sw, route, &pkg->ep_uuid); in __icm_tr_device_connected()
1285 if (add_switch(parent_sw, sw)) in __icm_tr_device_connected()
1289 pm_runtime_mark_last_busy(&parent_sw->dev); in __icm_tr_device_connected()
1290 pm_runtime_put_autosuspend(&parent_sw->dev); in __icm_tr_device_connected()
1292 tb_switch_put(parent_sw); in __icm_tr_device_connected()