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()
650 struct tb_switch *parent_sw = tb_switch_parent(sw); in update_switch() local
655 tb_port_at(route, parent_sw)->remote = tb_upstream_port(sw); in update_switch()
725 struct tb_switch *sw, *parent_sw; in icm_fr_device_connected() local
826 parent_sw = tb_switch_find_by_link_depth(tb, link, depth - 1); in icm_fr_device_connected()
827 if (!parent_sw) { in icm_fr_device_connected()
837 tb_switch_put(parent_sw); in icm_fr_device_connected()
841 pm_runtime_get_sync(&parent_sw->dev); in icm_fr_device_connected()
843 sw = alloc_switch(parent_sw, route, &pkg->ep_uuid); in icm_fr_device_connected()
857 if (add_switch(parent_sw, sw)) in icm_fr_device_connected()
861 pm_runtime_mark_last_busy(&parent_sw->dev); in icm_fr_device_connected()
862 pm_runtime_put_autosuspend(&parent_sw->dev); in icm_fr_device_connected()
864 tb_switch_put(parent_sw); in icm_fr_device_connected()
1205 struct tb_switch *sw, *parent_sw; in __icm_tr_device_connected() local
1261 parent_sw = tb_switch_find_by_route(tb, get_parent_route(route)); in __icm_tr_device_connected()
1262 if (!parent_sw) { in __icm_tr_device_connected()
1267 pm_runtime_get_sync(&parent_sw->dev); in __icm_tr_device_connected()
1269 sw = alloc_switch(parent_sw, route, &pkg->ep_uuid); in __icm_tr_device_connected()
1283 if (add_switch(parent_sw, sw)) in __icm_tr_device_connected()
1287 pm_runtime_mark_last_busy(&parent_sw->dev); in __icm_tr_device_connected()
1288 pm_runtime_put_autosuspend(&parent_sw->dev); in __icm_tr_device_connected()
1290 tb_switch_put(parent_sw); in __icm_tr_device_connected()