Lines Matching refs:src_port
495 struct tb_port *src_port, in tb_find_tunnel() argument
503 ((src_port && src_port == tunnel->src_port) || in tb_find_tunnel()
513 struct tb_port *src_port, in tb_find_first_usb3_tunnel() argument
520 if (tb_port_path_direction_downstream(src_port, dst_port)) in tb_find_first_usb3_tunnel()
523 sw = src_port->sw; in tb_find_first_usb3_tunnel()
554 struct tb_port *src_port, in tb_consumed_usb3_pcie_bandwidth() argument
565 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port); in tb_consumed_usb3_pcie_bandwidth()
566 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()
705 static int tb_maximum_bandwidth(struct tb *tb, struct tb_port *src_port, in tb_maximum_bandwidth() argument
709 bool downstream = tb_port_path_direction_downstream(src_port, dst_port); in tb_maximum_bandwidth()
716 if (!tb_asym_supported(src_port, dst_port, port)) in tb_maximum_bandwidth()
811 static int tb_available_bandwidth(struct tb *tb, struct tb_port *src_port, in tb_available_bandwidth() argument
822 tb_for_each_port_on_path(src_port, dst_port, port) { in tb_available_bandwidth()
828 ret = tb_maximum_bandwidth(tb, src_port, dst_port, port, in tb_available_bandwidth()
833 ret = tb_consumed_usb3_pcie_bandwidth(tb, src_port, dst_port, in tb_available_bandwidth()
841 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, port, in tb_available_bandwidth()
863 struct tb_port *src_port, in tb_release_unused_usb3_bandwidth() argument
868 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port); in tb_release_unused_usb3_bandwidth()
872 static void tb_reclaim_usb3_bandwidth(struct tb *tb, struct tb_port *src_port, in tb_reclaim_usb3_bandwidth() argument
878 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port); in tb_reclaim_usb3_bandwidth()
888 ret = tb_available_bandwidth(tb, tunnel->src_port, tunnel->dst_port, in tb_reclaim_usb3_bandwidth()
1033 static int tb_configure_asym(struct tb *tb, struct tb_port *src_port, in tb_configure_asym() argument
1045 downstream = tb_port_path_direction_downstream(src_port, dst_port); in tb_configure_asym()
1050 sw = src_port->sw; in tb_configure_asym()
1052 tb_for_each_upstream_port_on_path(src_port, dst_port, up) { in tb_configure_asym()
1057 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, up, in tb_configure_asym()
1139 static int tb_configure_sym(struct tb *tb, struct tb_port *src_port, in tb_configure_sym() argument
1150 downstream = tb_port_path_direction_downstream(src_port, dst_port); in tb_configure_sym()
1155 sw = src_port->sw; in tb_configure_sym()
1157 tb_for_each_upstream_port_on_path(src_port, dst_port, up) { in tb_configure_sym()
1167 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, up, in tb_configure_sym()
1457 first_tunnel->src_port, first_tunnel->dst_port); in tb_recalc_estimated_bandwidth_for_group()
1501 tb_reclaim_usb3_bandwidth(tb, first_tunnel->src_port, in tb_recalc_estimated_bandwidth_for_group()
1630 if (tunnel->src_port->sw == in->sw && in tb_attach_bandwidth_group()
1632 group = tunnel->src_port->group; in tb_attach_bandwidth_group()
1697 while (parent != tunnel->src_port->sw) { in tb_discover_tunnels()
1702 struct tb_port *in = tunnel->src_port; in tb_discover_tunnels()
1716 struct tb_port *src_port, *dst_port; in tb_deactivate_and_free_tunnel() local
1726 src_port = tunnel->src_port; in tb_deactivate_and_free_tunnel()
1731 tb_detach_bandwidth_group(src_port); in tb_deactivate_and_free_tunnel()
1736 tb_switch_dealloc_dp_resource(src_port->sw, src_port); in tb_deactivate_and_free_tunnel()
1741 tb_configure_sym(tb, src_port, dst_port, true); in tb_deactivate_and_free_tunnel()
1745 pm_runtime_mark_last_busy(&src_port->sw->dev); in tb_deactivate_and_free_tunnel()
1746 pm_runtime_put_autosuspend(&src_port->sw->dev); in tb_deactivate_and_free_tunnel()
1750 tb_reclaim_usb3_bandwidth(tb, src_port, dst_port); in tb_deactivate_and_free_tunnel()
1900 struct tb_port *in = tunnel->src_port; in tb_dp_tunnel_active()
1938 struct tb_port *in = tunnel->src_port; in tb_dp_tunnel_active()
2376 if (tunnel->src_port != nhi_port || tunnel->dst_port != dst_port) in __tb_disconnect_xdomain_paths()
2540 in = tunnel->src_port; in tb_alloc_dp_bandwidth()