Lines Matching refs:sw

99 	const struct tb_switch *sw = port->sw;
103 usb3 = tb_acpi_may_tunnel_usb3() ? sw->max_usb3_credits : 0;
104 pcie = tb_acpi_may_tunnel_pcie() ? sw->max_pcie_credits : 0;
107 spare = min_not_zero(sw->max_dma_credits, dma_credits);
120 if (sw->min_dp_aux_credits + sw->min_dp_main_credits)
122 (sw->min_dp_aux_credits + sw->min_dp_main_credits);
128 credits -= ndp * (sw->min_dp_aux_credits + sw->min_dp_main_credits);
143 usb4_switch_version(in_port->sw) >= 2)
172 struct tb_port *port = tb_upstream_port(tunnel->dst_port->sw);
176 if ((usb4_switch_version(tunnel->src_port->sw) < 2) ||
177 (usb4_switch_version(tunnel->dst_port->sw) < 2))
237 struct tb_switch *sw = port->sw;
244 credits = min(sw->max_pcie_credits, available);
437 if (!tb_switch_find_port(port->sw, TB_TYPE_PCIE_UP))
439 if (!tb_switch_find_port(port->remote->sw, TB_TYPE_PCIE_DOWN))
442 if (!tb_switch_find_port(port->sw, TB_TYPE_PCIE_DOWN))
444 if (!tb_switch_find_port(port->remote->sw, TB_TYPE_PCIE_UP))
456 static bool tb_dp_is_usb4(const struct tb_switch *sw)
459 return tb_switch_is_usb4(sw) || tb_switch_is_titan_ridge(sw);
470 if (!tb_dp_is_usb4(in->sw) || !tb_dp_is_usb4(out->sw))
664 if (in->sw->generation < 2 || out->sw->generation < 2)
743 if (tb_route(out->sw) && tb_switch_is_titan_ridge(out->sw)) {
857 struct tb_switch *sw = in->sw;
858 struct tb *tb = in->sw->tb;
865 if (!tb_switch_is_usb4(sw))
1166 const struct tb_switch *sw = tunnel->src_port->sw;
1170 if (tb_dp_is_usb4(sw)) {
1197 } else if (sw->generation >= 2) {
1222 struct tb_switch *sw = port->sw;
1225 hop->initial_credits = sw->min_dp_aux_credits;
1251 struct tb_switch *sw = port->sw;
1266 if (nfc_credits / sw->min_dp_main_credits > max_dp_streams)
1269 hop->nfc_credits = sw->min_dp_main_credits;
1477 pm_support = usb4_switch_version(in->sw) >= 2;
1509 const struct tb_switch *sw = port->sw;
1514 credits -= sw->max_pcie_credits;
1686 credits = min_not_zero(dma_credits, nhi->sw->max_dma_credits);
1823 struct tb_port *port = tb_upstream_port(tunnel->dst_port->sw);
1915 struct tb_switch *sw = port->sw;
1919 credits = sw->max_usb3_credits;
2012 if (!tb_route(down->sw)) {
2069 if (!tb_route(down->sw) && (max_up > 0 || max_down > 0)) {
2112 if (!tb_route(down->sw)) {