Lines Matching refs:src_port

491 					struct tb_port *src_port,  in tb_find_tunnel()  argument
499 ((src_port && src_port == tunnel->src_port) || in tb_find_tunnel()
509 struct tb_port *src_port, in tb_find_first_usb3_tunnel() argument
516 if (tb_port_path_direction_downstream(src_port, dst_port)) in tb_find_first_usb3_tunnel()
519 sw = src_port->sw; in tb_find_first_usb3_tunnel()
552 struct tb_port *src_port, in tb_consumed_usb3_pcie_bandwidth() argument
563 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port); in tb_consumed_usb3_pcie_bandwidth()
564 if (tunnel && !tb_port_is_usb3_down(src_port) && in tb_consumed_usb3_pcie_bandwidth()
606 struct tb_port *src_port, in tb_consumed_dp_bandwidth() argument
642 group = tunnel->src_port->group; in tb_consumed_dp_bandwidth()
651 if (tunnel->src_port == src_port && in tb_consumed_dp_bandwidth()
664 downstream = tb_port_path_direction_downstream(src_port, dst_port); in tb_consumed_dp_bandwidth()
675 static bool tb_asym_supported(struct tb_port *src_port, struct tb_port *dst_port, in tb_asym_supported() argument
678 bool downstream = tb_port_path_direction_downstream(src_port, dst_port); in tb_asym_supported()
707 static int tb_maximum_bandwidth(struct tb *tb, struct tb_port *src_port, in tb_maximum_bandwidth() argument
711 bool downstream = tb_port_path_direction_downstream(src_port, dst_port); in tb_maximum_bandwidth()
718 if (!tb_asym_supported(src_port, dst_port, port)) in tb_maximum_bandwidth()
815 static int tb_available_bandwidth(struct tb *tb, struct tb_port *src_port, in tb_available_bandwidth() argument
826 tb_for_each_port_on_path(src_port, dst_port, port) { in tb_available_bandwidth()
832 ret = tb_maximum_bandwidth(tb, src_port, dst_port, port, in tb_available_bandwidth()
837 ret = tb_consumed_usb3_pcie_bandwidth(tb, src_port, dst_port, in tb_available_bandwidth()
845 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, port, in tb_available_bandwidth()
867 struct tb_port *src_port, in tb_release_unused_usb3_bandwidth() argument
872 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port); in tb_release_unused_usb3_bandwidth()
876 static void tb_reclaim_usb3_bandwidth(struct tb *tb, struct tb_port *src_port, in tb_reclaim_usb3_bandwidth() argument
882 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port); in tb_reclaim_usb3_bandwidth()
892 ret = tb_available_bandwidth(tb, tunnel->src_port, tunnel->dst_port, in tb_reclaim_usb3_bandwidth()
1039 static int tb_configure_asym(struct tb *tb, struct tb_port *src_port, in tb_configure_asym() argument
1051 downstream = tb_port_path_direction_downstream(src_port, dst_port); in tb_configure_asym()
1056 sw = src_port->sw; in tb_configure_asym()
1058 tb_for_each_upstream_port_on_path(src_port, dst_port, up) { in tb_configure_asym()
1063 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, up, in tb_configure_asym()
1147 static int tb_configure_sym(struct tb *tb, struct tb_port *src_port, in tb_configure_sym() argument
1158 downstream = tb_port_path_direction_downstream(src_port, dst_port); in tb_configure_sym()
1163 sw = src_port->sw; in tb_configure_sym()
1165 tb_for_each_upstream_port_on_path(src_port, dst_port, up) { in tb_configure_sym()
1175 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, up, in tb_configure_sym()
1465 first_tunnel->src_port, first_tunnel->dst_port); in tb_recalc_estimated_bandwidth_for_group()
1509 tb_reclaim_usb3_bandwidth(tb, first_tunnel->src_port, in tb_recalc_estimated_bandwidth_for_group()
1638 if (tunnel->src_port->sw == in->sw && in tb_attach_bandwidth_group()
1640 group = tunnel->src_port->group; in tb_attach_bandwidth_group()
1705 while (parent != tunnel->src_port->sw) { in tb_discover_tunnels()
1710 struct tb_port *in = tunnel->src_port; in tb_discover_tunnels()
1724 struct tb_port *src_port, *dst_port; in tb_deactivate_and_free_tunnel() local
1734 src_port = tunnel->src_port; in tb_deactivate_and_free_tunnel()
1739 tb_detach_bandwidth_group(src_port); in tb_deactivate_and_free_tunnel()
1744 tb_switch_dealloc_dp_resource(src_port->sw, src_port); in tb_deactivate_and_free_tunnel()
1749 tb_configure_sym(tb, src_port, dst_port, true); in tb_deactivate_and_free_tunnel()
1753 pm_runtime_mark_last_busy(&src_port->sw->dev); in tb_deactivate_and_free_tunnel()
1754 pm_runtime_put_autosuspend(&src_port->sw->dev); in tb_deactivate_and_free_tunnel()
1758 tb_reclaim_usb3_bandwidth(tb, src_port, dst_port); in tb_deactivate_and_free_tunnel()
1908 struct tb_port *in = tunnel->src_port; in tb_dp_tunnel_active()
1946 struct tb_port *in = tunnel->src_port; in tb_dp_tunnel_active()
2384 if (tunnel->src_port != nhi_port || tunnel->dst_port != dst_port) in __tb_disconnect_xdomain_paths()
2548 in = tunnel->src_port; in tb_alloc_dp_bandwidth()