Lines Matching +full:0 +full:xd
179 struct tb_xdomain *xd; in tb_scan_xdomain() local
183 xd = tb_xdomain_find_by_route(tb, route); in tb_scan_xdomain()
184 if (xd) { in tb_scan_xdomain()
185 tb_xdomain_put(xd); in tb_scan_xdomain()
189 xd = tb_xdomain_alloc(tb, &sw->dev, route, tb->root_switch->uuid, in tb_scan_xdomain()
191 if (xd) { in tb_scan_xdomain()
192 tb_port_at(route, sw)->xdomain = xd; in tb_scan_xdomain()
194 tb_xdomain_add(xd); in tb_scan_xdomain()
204 return 0; in tb_enable_tmu()
314 usb3_consumed_up = 0; in tb_available_bandwidth()
315 usb3_consumed_down = 0; in tb_available_bandwidth()
331 if (link_speed < 0) in tb_available_bandwidth()
382 if (*available_up < 0) in tb_available_bandwidth()
383 *available_up = 0; in tb_available_bandwidth()
384 if (*available_down < 0) in tb_available_bandwidth()
385 *available_down = 0; in tb_available_bandwidth()
387 return 0; in tb_available_bandwidth()
397 return tunnel ? tb_tunnel_release_unused_bandwidth(tunnel) : 0; in tb_release_unused_usb3_bandwidth()
439 return 0; in tb_tunnel_usb3()
442 return 0; in tb_tunnel_usb3()
451 return 0; in tb_tunnel_usb3()
462 return 0; in tb_tunnel_usb3()
496 return 0; in tb_tunnel_usb3()
526 return 0; in tb_create_usb3_tunnels()
572 * Only scan on the primary port (link_nr == 0). in tb_scan_port()
574 if (tb_wait_for_port(port, false) <= 0) in tb_scan_port()
1014 return 0; in tb_tunnel_pci()
1024 return 0; in tb_tunnel_pci()
1038 return 0; in tb_tunnel_pci()
1041 static int tb_approve_xdomain_paths(struct tb *tb, struct tb_xdomain *xd) in tb_approve_xdomain_paths() argument
1048 sw = tb_to_switch(xd->dev.parent); in tb_approve_xdomain_paths()
1049 dst_port = tb_port_at(xd->route, sw); in tb_approve_xdomain_paths()
1053 tunnel = tb_tunnel_alloc_dma(tb, nhi_port, dst_port, xd->transmit_ring, in tb_approve_xdomain_paths()
1054 xd->transmit_path, xd->receive_ring, in tb_approve_xdomain_paths()
1055 xd->receive_path); in tb_approve_xdomain_paths()
1071 return 0; in tb_approve_xdomain_paths()
1074 static void __tb_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd) in __tb_disconnect_xdomain_paths() argument
1080 sw = tb_to_switch(xd->dev.parent); in __tb_disconnect_xdomain_paths()
1081 dst_port = tb_port_at(xd->route, sw); in __tb_disconnect_xdomain_paths()
1092 static int tb_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd) in tb_disconnect_xdomain_paths() argument
1094 if (!xd->is_unplugged) { in tb_disconnect_xdomain_paths()
1096 __tb_disconnect_xdomain_paths(tb, xd); in tb_disconnect_xdomain_paths()
1099 return 0; in tb_disconnect_xdomain_paths()
1164 struct tb_xdomain *xd = tb_xdomain_get(port->xdomain); in tb_handle_hotplug() local
1174 xd->is_unplugged = true; in tb_handle_hotplug()
1175 tb_xdomain_remove(xd); in tb_handle_hotplug()
1177 __tb_disconnect_xdomain_paths(tb, xd); in tb_handle_hotplug()
1178 tb_xdomain_put(xd); in tb_handle_hotplug()
1279 return 0; in tb_scan_finalize_switch()
1287 tb->root_switch = tb_switch_alloc(tb, &tb->dev, 0); in tb_start()
1332 return 0; in tb_start()
1345 return 0; in tb_suspend_noirq()
1402 return 0; in tb_resume_noirq()
1408 int ret = 0; in tb_free_unplugged_xdomains()
1432 return 0; in tb_freeze_noirq()
1440 return 0; in tb_thaw_noirq()
1465 return 0; in tb_runtime_suspend()
1501 return 0; in tb_runtime_resume()