Lines Matching full:ports

54 	size = (sw->config.max_port_number + 1) * sizeof(*sw->ports);  in alloc_switch()
55 sw->ports = kunit_kzalloc(test, size, GFP_KERNEL); in alloc_switch()
56 if (!sw->ports) in alloc_switch()
60 sw->ports[i].sw = sw; in alloc_switch()
61 sw->ports[i].port = i; in alloc_switch()
62 sw->ports[i].config.port_number = i; in alloc_switch()
64 kunit_ida_init(test, &sw->ports[i].in_hopids); in alloc_switch()
65 kunit_ida_init(test, &sw->ports[i].out_hopids); in alloc_switch()
83 sw->ports[0].config.type = TB_TYPE_PORT; in alloc_host()
84 sw->ports[0].config.max_in_hop_id = 7; in alloc_host()
85 sw->ports[0].config.max_out_hop_id = 7; in alloc_host()
87 sw->ports[1].config.type = TB_TYPE_PORT; in alloc_host()
88 sw->ports[1].config.max_in_hop_id = 19; in alloc_host()
89 sw->ports[1].config.max_out_hop_id = 19; in alloc_host()
90 sw->ports[1].total_credits = 60; in alloc_host()
91 sw->ports[1].ctl_credits = 2; in alloc_host()
92 sw->ports[1].dual_link_port = &sw->ports[2]; in alloc_host()
94 sw->ports[2].config.type = TB_TYPE_PORT; in alloc_host()
95 sw->ports[2].config.max_in_hop_id = 19; in alloc_host()
96 sw->ports[2].config.max_out_hop_id = 19; in alloc_host()
97 sw->ports[2].total_credits = 60; in alloc_host()
98 sw->ports[2].ctl_credits = 2; in alloc_host()
99 sw->ports[2].dual_link_port = &sw->ports[1]; in alloc_host()
100 sw->ports[2].link_nr = 1; in alloc_host()
102 sw->ports[3].config.type = TB_TYPE_PORT; in alloc_host()
103 sw->ports[3].config.max_in_hop_id = 19; in alloc_host()
104 sw->ports[3].config.max_out_hop_id = 19; in alloc_host()
105 sw->ports[3].total_credits = 60; in alloc_host()
106 sw->ports[3].ctl_credits = 2; in alloc_host()
107 sw->ports[3].dual_link_port = &sw->ports[4]; in alloc_host()
109 sw->ports[4].config.type = TB_TYPE_PORT; in alloc_host()
110 sw->ports[4].config.max_in_hop_id = 19; in alloc_host()
111 sw->ports[4].config.max_out_hop_id = 19; in alloc_host()
112 sw->ports[4].total_credits = 60; in alloc_host()
113 sw->ports[4].ctl_credits = 2; in alloc_host()
114 sw->ports[4].dual_link_port = &sw->ports[3]; in alloc_host()
115 sw->ports[4].link_nr = 1; in alloc_host()
117 sw->ports[5].config.type = TB_TYPE_DP_HDMI_IN; in alloc_host()
118 sw->ports[5].config.max_in_hop_id = 9; in alloc_host()
119 sw->ports[5].config.max_out_hop_id = 9; in alloc_host()
120 sw->ports[5].cap_adap = -1; in alloc_host()
122 sw->ports[6].config.type = TB_TYPE_DP_HDMI_IN; in alloc_host()
123 sw->ports[6].config.max_in_hop_id = 9; in alloc_host()
124 sw->ports[6].config.max_out_hop_id = 9; in alloc_host()
125 sw->ports[6].cap_adap = -1; in alloc_host()
127 sw->ports[7].config.type = TB_TYPE_NHI; in alloc_host()
128 sw->ports[7].config.max_in_hop_id = 11; in alloc_host()
129 sw->ports[7].config.max_out_hop_id = 11; in alloc_host()
130 sw->ports[7].config.nfc_credits = 0x41800000; in alloc_host()
132 sw->ports[8].config.type = TB_TYPE_PCIE_DOWN; in alloc_host()
133 sw->ports[8].config.max_in_hop_id = 8; in alloc_host()
134 sw->ports[8].config.max_out_hop_id = 8; in alloc_host()
136 sw->ports[9].config.type = TB_TYPE_PCIE_DOWN; in alloc_host()
137 sw->ports[9].config.max_in_hop_id = 8; in alloc_host()
138 sw->ports[9].config.max_out_hop_id = 8; in alloc_host()
140 sw->ports[10].disabled = true; in alloc_host()
141 sw->ports[11].disabled = true; in alloc_host()
143 sw->ports[12].config.type = TB_TYPE_USB3_DOWN; in alloc_host()
144 sw->ports[12].config.max_in_hop_id = 8; in alloc_host()
145 sw->ports[12].config.max_out_hop_id = 8; in alloc_host()
147 sw->ports[13].config.type = TB_TYPE_USB3_DOWN; in alloc_host()
148 sw->ports[13].config.max_in_hop_id = 8; in alloc_host()
149 sw->ports[13].config.max_out_hop_id = 8; in alloc_host()
181 sw->ports[10].config.type = TB_TYPE_DP_HDMI_IN; in alloc_host_br()
182 sw->ports[10].config.max_in_hop_id = 9; in alloc_host_br()
183 sw->ports[10].config.max_out_hop_id = 9; in alloc_host_br()
184 sw->ports[10].cap_adap = -1; in alloc_host_br()
185 sw->ports[10].disabled = false; in alloc_host_br()
204 sw->ports[0].config.type = TB_TYPE_PORT; in alloc_dev_default()
205 sw->ports[0].config.max_in_hop_id = 8; in alloc_dev_default()
206 sw->ports[0].config.max_out_hop_id = 8; in alloc_dev_default()
208 sw->ports[1].config.type = TB_TYPE_PORT; in alloc_dev_default()
209 sw->ports[1].config.max_in_hop_id = 19; in alloc_dev_default()
210 sw->ports[1].config.max_out_hop_id = 19; in alloc_dev_default()
211 sw->ports[1].total_credits = 60; in alloc_dev_default()
212 sw->ports[1].ctl_credits = 2; in alloc_dev_default()
213 sw->ports[1].dual_link_port = &sw->ports[2]; in alloc_dev_default()
215 sw->ports[2].config.type = TB_TYPE_PORT; in alloc_dev_default()
216 sw->ports[2].config.max_in_hop_id = 19; in alloc_dev_default()
217 sw->ports[2].config.max_out_hop_id = 19; in alloc_dev_default()
218 sw->ports[2].total_credits = 60; in alloc_dev_default()
219 sw->ports[2].ctl_credits = 2; in alloc_dev_default()
220 sw->ports[2].dual_link_port = &sw->ports[1]; in alloc_dev_default()
221 sw->ports[2].link_nr = 1; in alloc_dev_default()
223 sw->ports[3].config.type = TB_TYPE_PORT; in alloc_dev_default()
224 sw->ports[3].config.max_in_hop_id = 19; in alloc_dev_default()
225 sw->ports[3].config.max_out_hop_id = 19; in alloc_dev_default()
226 sw->ports[3].total_credits = 60; in alloc_dev_default()
227 sw->ports[3].ctl_credits = 2; in alloc_dev_default()
228 sw->ports[3].dual_link_port = &sw->ports[4]; in alloc_dev_default()
230 sw->ports[4].config.type = TB_TYPE_PORT; in alloc_dev_default()
231 sw->ports[4].config.max_in_hop_id = 19; in alloc_dev_default()
232 sw->ports[4].config.max_out_hop_id = 19; in alloc_dev_default()
233 sw->ports[4].total_credits = 60; in alloc_dev_default()
234 sw->ports[4].ctl_credits = 2; in alloc_dev_default()
235 sw->ports[4].dual_link_port = &sw->ports[3]; in alloc_dev_default()
236 sw->ports[4].link_nr = 1; in alloc_dev_default()
238 sw->ports[5].config.type = TB_TYPE_PORT; in alloc_dev_default()
239 sw->ports[5].config.max_in_hop_id = 19; in alloc_dev_default()
240 sw->ports[5].config.max_out_hop_id = 19; in alloc_dev_default()
241 sw->ports[5].total_credits = 60; in alloc_dev_default()
242 sw->ports[5].ctl_credits = 2; in alloc_dev_default()
243 sw->ports[5].dual_link_port = &sw->ports[6]; in alloc_dev_default()
245 sw->ports[6].config.type = TB_TYPE_PORT; in alloc_dev_default()
246 sw->ports[6].config.max_in_hop_id = 19; in alloc_dev_default()
247 sw->ports[6].config.max_out_hop_id = 19; in alloc_dev_default()
248 sw->ports[6].total_credits = 60; in alloc_dev_default()
249 sw->ports[6].ctl_credits = 2; in alloc_dev_default()
250 sw->ports[6].dual_link_port = &sw->ports[5]; in alloc_dev_default()
251 sw->ports[6].link_nr = 1; in alloc_dev_default()
253 sw->ports[7].config.type = TB_TYPE_PORT; in alloc_dev_default()
254 sw->ports[7].config.max_in_hop_id = 19; in alloc_dev_default()
255 sw->ports[7].config.max_out_hop_id = 19; in alloc_dev_default()
256 sw->ports[7].total_credits = 60; in alloc_dev_default()
257 sw->ports[7].ctl_credits = 2; in alloc_dev_default()
258 sw->ports[7].dual_link_port = &sw->ports[8]; in alloc_dev_default()
260 sw->ports[8].config.type = TB_TYPE_PORT; in alloc_dev_default()
261 sw->ports[8].config.max_in_hop_id = 19; in alloc_dev_default()
262 sw->ports[8].config.max_out_hop_id = 19; in alloc_dev_default()
263 sw->ports[8].total_credits = 60; in alloc_dev_default()
264 sw->ports[8].ctl_credits = 2; in alloc_dev_default()
265 sw->ports[8].dual_link_port = &sw->ports[7]; in alloc_dev_default()
266 sw->ports[8].link_nr = 1; in alloc_dev_default()
268 sw->ports[9].config.type = TB_TYPE_PCIE_UP; in alloc_dev_default()
269 sw->ports[9].config.max_in_hop_id = 8; in alloc_dev_default()
270 sw->ports[9].config.max_out_hop_id = 8; in alloc_dev_default()
272 sw->ports[10].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
273 sw->ports[10].config.max_in_hop_id = 8; in alloc_dev_default()
274 sw->ports[10].config.max_out_hop_id = 8; in alloc_dev_default()
276 sw->ports[11].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
277 sw->ports[11].config.max_in_hop_id = 8; in alloc_dev_default()
278 sw->ports[11].config.max_out_hop_id = 8; in alloc_dev_default()
280 sw->ports[12].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
281 sw->ports[12].config.max_in_hop_id = 8; in alloc_dev_default()
282 sw->ports[12].config.max_out_hop_id = 8; in alloc_dev_default()
284 sw->ports[13].config.type = TB_TYPE_DP_HDMI_OUT; in alloc_dev_default()
285 sw->ports[13].config.max_in_hop_id = 9; in alloc_dev_default()
286 sw->ports[13].config.max_out_hop_id = 9; in alloc_dev_default()
287 sw->ports[13].cap_adap = -1; in alloc_dev_default()
289 sw->ports[14].config.type = TB_TYPE_DP_HDMI_OUT; in alloc_dev_default()
290 sw->ports[14].config.max_in_hop_id = 9; in alloc_dev_default()
291 sw->ports[14].config.max_out_hop_id = 9; in alloc_dev_default()
292 sw->ports[14].cap_adap = -1; in alloc_dev_default()
294 sw->ports[15].disabled = true; in alloc_dev_default()
296 sw->ports[16].config.type = TB_TYPE_USB3_UP; in alloc_dev_default()
297 sw->ports[16].config.max_in_hop_id = 8; in alloc_dev_default()
298 sw->ports[16].config.max_out_hop_id = 8; in alloc_dev_default()
300 sw->ports[17].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
301 sw->ports[17].config.max_in_hop_id = 8; in alloc_dev_default()
302 sw->ports[17].config.max_out_hop_id = 8; in alloc_dev_default()
304 sw->ports[18].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
305 sw->ports[18].config.max_in_hop_id = 8; in alloc_dev_default()
306 sw->ports[18].config.max_out_hop_id = 8; in alloc_dev_default()
308 sw->ports[19].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
309 sw->ports[19].config.max_in_hop_id = 8; in alloc_dev_default()
310 sw->ports[19].config.max_out_hop_id = 8; in alloc_dev_default()
350 sw->ports[13].config.type = TB_TYPE_DP_HDMI_IN; in alloc_dev_with_dpin()
351 sw->ports[13].config.max_in_hop_id = 9; in alloc_dev_with_dpin()
352 sw->ports[13].config.max_out_hop_id = 9; in alloc_dev_with_dpin()
354 sw->ports[14].config.type = TB_TYPE_DP_HDMI_IN; in alloc_dev_with_dpin()
355 sw->ports[14].config.max_in_hop_id = 9; in alloc_dev_with_dpin()
356 sw->ports[14].config.max_out_hop_id = 9; in alloc_dev_with_dpin()
380 sw->ports[i].disabled = true; in alloc_dev_without_dp()
383 sw->ports[i].disabled = true; in alloc_dev_without_dp()
385 sw->ports[13].cap_adap = 0; in alloc_dev_without_dp()
386 sw->ports[14].cap_adap = 0; in alloc_dev_without_dp()
389 sw->ports[i].disabled = true; in alloc_dev_without_dp()
430 src_port = &host->ports[5]; in tb_test_path_basic()
449 src_port = &host->ports[12]; in tb_test_path_not_connected_walk()
450 dst_port = &dev->ports[16]; in tb_test_path_not_connected_walk()
456 KUNIT_EXPECT_PTR_EQ(test, p, &host->ports[3]); in tb_test_path_not_connected_walk()
467 KUNIT_EXPECT_PTR_EQ(test, p, &dev->ports[1]); in tb_test_path_not_connected_walk()
503 src_port = &host->ports[8]; in tb_test_path_single_hop_walk()
504 dst_port = &dev->ports[9]; in tb_test_path_single_hop_walk()
562 src_port = &host->ports[5]; in tb_test_path_daisy_chain_walk()
563 dst_port = &dev2->ports[13]; in tb_test_path_daisy_chain_walk()
625 src_port = &host->ports[5]; in tb_test_path_simple_tree_walk()
626 dst_port = &dev3->ports[13]; in tb_test_path_simple_tree_walk()
709 src_port = &dev3->ports[13]; in tb_test_path_complex_tree_walk()
710 dst_port = &dev9->ports[14]; in tb_test_path_complex_tree_walk()
812 src_port = &dev6->ports[13]; in tb_test_path_max_length_walk()
813 dst_port = &dev12->ports[13]; in tb_test_path_max_length_walk()
853 down = &dev1->ports[10]; in tb_test_path_not_connected()
854 up = &dev2->ports[9]; in tb_test_path_not_connected()
904 down = &host->ports[9]; in tb_test_path_not_bonded_lane0()
905 up = &dev->ports[9]; in tb_test_path_not_bonded_lane0()
966 in = &host->ports[5]; in tb_test_path_not_bonded_lane1()
967 out = &dev->ports[13]; in tb_test_path_not_bonded_lane1()
1046 in = &host->ports[5]; in tb_test_path_not_bonded_lane1_chain()
1047 out = &dev3->ports[13]; in tb_test_path_not_bonded_lane1_chain()
1126 in = &dev3->ports[13]; in tb_test_path_not_bonded_lane1_chain_reverse()
1127 out = &host->ports[5]; in tb_test_path_not_bonded_lane1_chain_reverse()
1218 in = &host->ports[5]; in tb_test_path_mixed_chain()
1219 out = &dev4->ports[13]; in tb_test_path_mixed_chain()
1310 in = &dev4->ports[13]; in tb_test_path_mixed_chain_reverse()
1311 out = &host->ports[5]; in tb_test_path_mixed_chain_reverse()
1355 down = &host->ports[8]; in tb_test_tunnel_pcie()
1356 up = &dev1->ports[9]; in tb_test_tunnel_pcie()
1370 down = &dev1->ports[10]; in tb_test_tunnel_pcie()
1371 up = &dev2->ports[9]; in tb_test_tunnel_pcie()
1406 in = &host->ports[5]; in tb_test_tunnel_dp()
1407 out = &dev->ports[13]; in tb_test_tunnel_dp()
1452 in = &host->ports[5]; in tb_test_tunnel_dp_chain()
1453 out = &dev4->ports[14]; in tb_test_tunnel_dp_chain()
1502 in = &dev2->ports[13]; in tb_test_tunnel_dp_tree()
1503 out = &dev5->ports[13]; in tb_test_tunnel_dp_tree()
1567 in = &dev6->ports[13]; in tb_test_tunnel_dp_max_length()
1568 out = &dev12->ports[13]; in tb_test_tunnel_dp_max_length()
1581 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1583 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1589 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1591 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1596 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1598 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1632 in1 = &host->ports[5]; in tb_test_tunnel_3dp()
1633 in2 = &host->ports[6]; in tb_test_tunnel_3dp()
1634 in3 = &host->ports[10]; in tb_test_tunnel_3dp()
1636 out1 = &dev2->ports[13]; in tb_test_tunnel_3dp()
1637 out2 = &dev5->ports[13]; in tb_test_tunnel_3dp()
1638 out3 = &dev4->ports[14]; in tb_test_tunnel_3dp()
1689 down = &host->ports[12]; in tb_test_tunnel_usb3()
1690 up = &dev1->ports[16]; in tb_test_tunnel_usb3()
1704 down = &dev1->ports[17]; in tb_test_tunnel_usb3()
1705 up = &dev2->ports[16]; in tb_test_tunnel_usb3()
1750 in = &dev2->ports[13]; in tb_test_tunnel_port_on_path()
1751 out = &dev5->ports[13]; in tb_test_tunnel_port_on_path()
1759 port = &host->ports[8]; in tb_test_tunnel_port_on_path()
1762 port = &host->ports[3]; in tb_test_tunnel_port_on_path()
1765 port = &dev1->ports[1]; in tb_test_tunnel_port_on_path()
1768 port = &dev1->ports[3]; in tb_test_tunnel_port_on_path()
1771 port = &dev1->ports[5]; in tb_test_tunnel_port_on_path()
1774 port = &dev1->ports[7]; in tb_test_tunnel_port_on_path()
1777 port = &dev3->ports[1]; in tb_test_tunnel_port_on_path()
1780 port = &dev5->ports[1]; in tb_test_tunnel_port_on_path()
1783 port = &dev4->ports[1]; in tb_test_tunnel_port_on_path()
1807 nhi = &host->ports[7]; in tb_test_tunnel_dma()
1808 port = &host->ports[1]; in tb_test_tunnel_dma()
1850 nhi = &host->ports[7]; in tb_test_tunnel_dma_rx()
1851 port = &host->ports[1]; in tb_test_tunnel_dma_rx()
1887 nhi = &host->ports[7]; in tb_test_tunnel_dma_tx()
1888 port = &host->ports[1]; in tb_test_tunnel_dma_tx()
1934 nhi = &host->ports[7]; in tb_test_tunnel_dma_chain()
1935 port = &dev2->ports[3]; in tb_test_tunnel_dma_chain()
1947 &dev2->ports[1]); in tb_test_tunnel_dma_chain()
1949 &dev1->ports[7]); in tb_test_tunnel_dma_chain()
1951 &dev1->ports[1]); in tb_test_tunnel_dma_chain()
1953 &host->ports[1]); in tb_test_tunnel_dma_chain()
1961 &dev1->ports[1]); in tb_test_tunnel_dma_chain()
1963 &dev1->ports[7]); in tb_test_tunnel_dma_chain()
1965 &dev2->ports[1]); in tb_test_tunnel_dma_chain()
1979 nhi = &host->ports[7]; in tb_test_tunnel_dma_match()
1980 port = &host->ports[1]; in tb_test_tunnel_dma_match()
2033 down = &host->ports[8]; in tb_test_credit_alloc_legacy_not_bonded()
2034 up = &dev->ports[9]; in tb_test_credit_alloc_legacy_not_bonded()
2066 down = &host->ports[8]; in tb_test_credit_alloc_legacy_bonded()
2067 up = &dev->ports[9]; in tb_test_credit_alloc_legacy_bonded()
2099 down = &host->ports[8]; in tb_test_credit_alloc_pcie()
2100 up = &dev->ports[9]; in tb_test_credit_alloc_pcie()
2147 down = &host->ports[8]; in tb_test_credit_alloc_without_dp()
2148 up = &dev->ports[9]; in tb_test_credit_alloc_without_dp()
2182 in = &host->ports[5]; in tb_test_credit_alloc_dp()
2183 out = &dev->ports[14]; in tb_test_credit_alloc_dp()
2226 down = &host->ports[12]; in tb_test_credit_alloc_usb3()
2227 up = &dev->ports[16]; in tb_test_credit_alloc_usb3()
2259 nhi = &host->ports[7]; in tb_test_credit_alloc_dma()
2260 port = &dev->ports[3]; in tb_test_credit_alloc_dma()
2295 nhi = &host->ports[7]; in tb_test_credit_alloc_dma_multiple()
2296 port = &dev->ports[3]; in tb_test_credit_alloc_dma_multiple()
2299 * Create three DMA tunnels through the same ports. With the in tb_test_credit_alloc_dma_multiple()
2389 down = &host->ports[8]; in TB_TEST_PCIE_TUNNEL()
2390 up = &dev->ports[9]; in TB_TEST_PCIE_TUNNEL()
2419 in = &host->ports[5]; in TB_TEST_DP_TUNNEL1()
2420 out = &dev->ports[13]; in TB_TEST_DP_TUNNEL1()
2456 in = &host->ports[6]; in TB_TEST_DP_TUNNEL2()
2457 out = &dev->ports[14]; in TB_TEST_DP_TUNNEL2()
2493 down = &host->ports[12]; in TB_TEST_USB3_TUNNEL()
2494 up = &dev->ports[16]; in TB_TEST_USB3_TUNNEL()
2523 nhi = &host->ports[7]; in TB_TEST_DMA_TUNNEL1()
2524 port = &dev->ports[3]; in TB_TEST_DMA_TUNNEL1()
2553 nhi = &host->ports[7]; in TB_TEST_DMA_TUNNEL2()
2554 port = &dev->ports[3]; in TB_TEST_DMA_TUNNEL2()