Lines Matching defs:src_port

447 					struct tb_port *src_port,
455 ((src_port && src_port == tunnel->src_port) ||
465 struct tb_port *src_port,
472 if (tb_port_path_direction_downstream(src_port, dst_port))
475 sw = src_port->sw;
494 * @src_port: Source protocol adapter
501 * from @src_port to @dst_port. Does not take USB3 tunnel starting from
502 * @src_port and ending on @src_port into account because that bandwidth is
506 struct tb_port *src_port,
517 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port);
518 if (tunnel && !tb_port_is_usb3_down(src_port) &&
543 * @src_port: Source protocol adapter
549 * Calculates consumed DP bandwidth at @port between path from @src_port
550 * to @dst_port. Does not take tunnel starting from @src_port and ending
551 * from @src_port into account.
554 * @src_port and @dst_port (but not yet used) that is also taken into
558 struct tb_port *src_port,
594 group = tunnel->src_port->group;
599 * Ignore the DP tunnel between src_port and dst_port
603 if (tunnel->src_port == src_port &&
616 downstream = tb_port_path_direction_downstream(src_port, dst_port);
627 static bool tb_asym_supported(struct tb_port *src_port, struct tb_port *dst_port,
630 bool downstream = tb_port_path_direction_downstream(src_port, dst_port);
644 * @src_port: Source protocol adapter
655 * direction from @src_port to @dst_port.
657 static int tb_maximum_bandwidth(struct tb *tb, struct tb_port *src_port,
661 bool downstream = tb_port_path_direction_downstream(src_port, dst_port);
668 if (!tb_asym_supported(src_port, dst_port, port))
747 * @src_port: Source protocol adapter
755 * @src_port and @dst_port at the moment. This is minimum of maximum
763 static int tb_available_bandwidth(struct tb *tb, struct tb_port *src_port,
774 tb_for_each_port_on_path(src_port, dst_port, port) {
780 ret = tb_maximum_bandwidth(tb, src_port, dst_port, port,
785 ret = tb_consumed_usb3_pcie_bandwidth(tb, src_port, dst_port,
793 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, port,
815 struct tb_port *src_port,
820 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port);
824 static void tb_reclaim_usb3_bandwidth(struct tb *tb, struct tb_port *src_port,
830 tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port);
840 ret = tb_available_bandwidth(tb, tunnel->src_port, tunnel->dst_port,
964 * @src_port: Source adapter to start the transition
969 * Transition links between @src_port and @dst_port into asymmetric, with
970 * three lanes in the direction from @src_port towards @dst_port and one lane
976 static int tb_configure_asym(struct tb *tb, struct tb_port *src_port,
988 downstream = tb_port_path_direction_downstream(src_port, dst_port);
993 sw = src_port->sw;
995 tb_for_each_upstream_port_on_path(src_port, dst_port, up) {
1000 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, up,
1074 * @src_port: Source adapter to start the transition
1078 * Goes over each link from @src_port to @dst_port and tries to
1082 static int tb_configure_sym(struct tb *tb, struct tb_port *src_port,
1093 downstream = tb_port_path_direction_downstream(src_port, dst_port);
1098 sw = src_port->sw;
1100 tb_for_each_upstream_port_on_path(src_port, dst_port, up) {
1110 ret = tb_consumed_dp_bandwidth(tb, src_port, dst_port, up,
1390 first_tunnel->src_port, first_tunnel->dst_port);
1434 tb_reclaim_usb3_bandwidth(tb, first_tunnel->src_port,
1563 if (tunnel->src_port->sw == in->sw &&
1565 group = tunnel->src_port->group;
1630 while (parent != tunnel->src_port->sw) {
1635 struct tb_port *in = tunnel->src_port;
1649 struct tb_port *src_port, *dst_port;
1659 src_port = tunnel->src_port;
1664 tb_detach_bandwidth_group(src_port);
1669 tb_switch_dealloc_dp_resource(src_port->sw, src_port);
1674 tb_configure_sym(tb, src_port, dst_port, true);
1678 pm_runtime_mark_last_busy(&src_port->sw->dev);
1679 pm_runtime_put_autosuspend(&src_port->sw->dev);
1683 tb_reclaim_usb3_bandwidth(tb, src_port, dst_port);
2231 if (tunnel->src_port != nhi_port || tunnel->dst_port != dst_port)
2395 in = tunnel->src_port;