Lines Matching +full:0 +full:xd
108 struct tb_xdomain *xd; in tb_scan_xdomain() local
112 xd = tb_xdomain_find_by_route(tb, route); in tb_scan_xdomain()
113 if (xd) { in tb_scan_xdomain()
114 tb_xdomain_put(xd); in tb_scan_xdomain()
118 xd = tb_xdomain_alloc(tb, &sw->dev, route, tb->root_switch->uuid, in tb_scan_xdomain()
120 if (xd) { in tb_scan_xdomain()
121 tb_port_at(route, sw)->xdomain = xd; in tb_scan_xdomain()
122 tb_xdomain_add(xd); in tb_scan_xdomain()
163 * Only scan on the primary port (link_nr == 0). in tb_scan_port()
165 if (tb_wait_for_port(port, false) <= 0) in tb_scan_port()
236 return 0; in tb_free_tunnel()
369 return 0; in tb_tunnel_dp()
374 return 0; in tb_tunnel_dp()
391 return 0; in tb_tunnel_dp()
408 return 0; in tb_tunnel_pci()
418 return 0; in tb_tunnel_pci()
432 return 0; in tb_tunnel_pci()
435 static int tb_approve_xdomain_paths(struct tb *tb, struct tb_xdomain *xd) in tb_approve_xdomain_paths() argument
442 sw = tb_to_switch(xd->dev.parent); in tb_approve_xdomain_paths()
443 dst_port = tb_port_at(xd->route, sw); in tb_approve_xdomain_paths()
447 tunnel = tb_tunnel_alloc_dma(tb, nhi_port, dst_port, xd->transmit_ring, in tb_approve_xdomain_paths()
448 xd->transmit_path, xd->receive_ring, in tb_approve_xdomain_paths()
449 xd->receive_path); in tb_approve_xdomain_paths()
465 return 0; in tb_approve_xdomain_paths()
468 static void __tb_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd) in __tb_disconnect_xdomain_paths() argument
473 sw = tb_to_switch(xd->dev.parent); in __tb_disconnect_xdomain_paths()
474 dst_port = tb_port_at(xd->route, sw); in __tb_disconnect_xdomain_paths()
484 static int tb_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd) in tb_disconnect_xdomain_paths() argument
486 if (!xd->is_unplugged) { in tb_disconnect_xdomain_paths()
488 __tb_disconnect_xdomain_paths(tb, xd); in tb_disconnect_xdomain_paths()
491 return 0; in tb_disconnect_xdomain_paths()
541 struct tb_xdomain *xd = tb_xdomain_get(port->xdomain); in tb_handle_hotplug() local
551 xd->is_unplugged = true; in tb_handle_hotplug()
552 tb_xdomain_remove(xd); in tb_handle_hotplug()
554 __tb_disconnect_xdomain_paths(tb, xd); in tb_handle_hotplug()
555 tb_xdomain_put(xd); in tb_handle_hotplug()
648 return 0; in tb_scan_finalize_switch()
656 tb->root_switch = tb_switch_alloc(tb, &tb->dev, 0); in tb_start()
690 return 0; in tb_start()
702 return 0; in tb_suspend_noirq()
713 tb_switch_reset(tb, 0); in tb_resume_noirq()
732 return 0; in tb_resume_noirq()
737 int i, ret = 0; in tb_free_unplugged_xdomains()