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()
187 sw->ports[0].config.type = TB_TYPE_PORT; in alloc_dev_default()
188 sw->ports[0].config.max_in_hop_id = 8; in alloc_dev_default()
189 sw->ports[0].config.max_out_hop_id = 8; in alloc_dev_default()
191 sw->ports[1].config.type = TB_TYPE_PORT; in alloc_dev_default()
192 sw->ports[1].config.max_in_hop_id = 19; in alloc_dev_default()
193 sw->ports[1].config.max_out_hop_id = 19; in alloc_dev_default()
194 sw->ports[1].total_credits = 60; in alloc_dev_default()
195 sw->ports[1].ctl_credits = 2; in alloc_dev_default()
196 sw->ports[1].dual_link_port = &sw->ports[2]; in alloc_dev_default()
198 sw->ports[2].config.type = TB_TYPE_PORT; in alloc_dev_default()
199 sw->ports[2].config.max_in_hop_id = 19; in alloc_dev_default()
200 sw->ports[2].config.max_out_hop_id = 19; in alloc_dev_default()
201 sw->ports[2].total_credits = 60; in alloc_dev_default()
202 sw->ports[2].ctl_credits = 2; in alloc_dev_default()
203 sw->ports[2].dual_link_port = &sw->ports[1]; in alloc_dev_default()
204 sw->ports[2].link_nr = 1; in alloc_dev_default()
206 sw->ports[3].config.type = TB_TYPE_PORT; in alloc_dev_default()
207 sw->ports[3].config.max_in_hop_id = 19; in alloc_dev_default()
208 sw->ports[3].config.max_out_hop_id = 19; in alloc_dev_default()
209 sw->ports[3].total_credits = 60; in alloc_dev_default()
210 sw->ports[3].ctl_credits = 2; in alloc_dev_default()
211 sw->ports[3].dual_link_port = &sw->ports[4]; in alloc_dev_default()
213 sw->ports[4].config.type = TB_TYPE_PORT; in alloc_dev_default()
214 sw->ports[4].config.max_in_hop_id = 19; in alloc_dev_default()
215 sw->ports[4].config.max_out_hop_id = 19; in alloc_dev_default()
216 sw->ports[4].total_credits = 60; in alloc_dev_default()
217 sw->ports[4].ctl_credits = 2; in alloc_dev_default()
218 sw->ports[4].dual_link_port = &sw->ports[3]; in alloc_dev_default()
219 sw->ports[4].link_nr = 1; in alloc_dev_default()
221 sw->ports[5].config.type = TB_TYPE_PORT; in alloc_dev_default()
222 sw->ports[5].config.max_in_hop_id = 19; in alloc_dev_default()
223 sw->ports[5].config.max_out_hop_id = 19; in alloc_dev_default()
224 sw->ports[5].total_credits = 60; in alloc_dev_default()
225 sw->ports[5].ctl_credits = 2; in alloc_dev_default()
226 sw->ports[5].dual_link_port = &sw->ports[6]; in alloc_dev_default()
228 sw->ports[6].config.type = TB_TYPE_PORT; in alloc_dev_default()
229 sw->ports[6].config.max_in_hop_id = 19; in alloc_dev_default()
230 sw->ports[6].config.max_out_hop_id = 19; in alloc_dev_default()
231 sw->ports[6].total_credits = 60; in alloc_dev_default()
232 sw->ports[6].ctl_credits = 2; in alloc_dev_default()
233 sw->ports[6].dual_link_port = &sw->ports[5]; in alloc_dev_default()
234 sw->ports[6].link_nr = 1; in alloc_dev_default()
236 sw->ports[7].config.type = TB_TYPE_PORT; in alloc_dev_default()
237 sw->ports[7].config.max_in_hop_id = 19; in alloc_dev_default()
238 sw->ports[7].config.max_out_hop_id = 19; in alloc_dev_default()
239 sw->ports[7].total_credits = 60; in alloc_dev_default()
240 sw->ports[7].ctl_credits = 2; in alloc_dev_default()
241 sw->ports[7].dual_link_port = &sw->ports[8]; in alloc_dev_default()
243 sw->ports[8].config.type = TB_TYPE_PORT; in alloc_dev_default()
244 sw->ports[8].config.max_in_hop_id = 19; in alloc_dev_default()
245 sw->ports[8].config.max_out_hop_id = 19; in alloc_dev_default()
246 sw->ports[8].total_credits = 60; in alloc_dev_default()
247 sw->ports[8].ctl_credits = 2; in alloc_dev_default()
248 sw->ports[8].dual_link_port = &sw->ports[7]; in alloc_dev_default()
249 sw->ports[8].link_nr = 1; in alloc_dev_default()
251 sw->ports[9].config.type = TB_TYPE_PCIE_UP; in alloc_dev_default()
252 sw->ports[9].config.max_in_hop_id = 8; in alloc_dev_default()
253 sw->ports[9].config.max_out_hop_id = 8; in alloc_dev_default()
255 sw->ports[10].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
256 sw->ports[10].config.max_in_hop_id = 8; in alloc_dev_default()
257 sw->ports[10].config.max_out_hop_id = 8; in alloc_dev_default()
259 sw->ports[11].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
260 sw->ports[11].config.max_in_hop_id = 8; in alloc_dev_default()
261 sw->ports[11].config.max_out_hop_id = 8; in alloc_dev_default()
263 sw->ports[12].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
264 sw->ports[12].config.max_in_hop_id = 8; in alloc_dev_default()
265 sw->ports[12].config.max_out_hop_id = 8; in alloc_dev_default()
267 sw->ports[13].config.type = TB_TYPE_DP_HDMI_OUT; in alloc_dev_default()
268 sw->ports[13].config.max_in_hop_id = 9; in alloc_dev_default()
269 sw->ports[13].config.max_out_hop_id = 9; in alloc_dev_default()
270 sw->ports[13].cap_adap = -1; in alloc_dev_default()
272 sw->ports[14].config.type = TB_TYPE_DP_HDMI_OUT; in alloc_dev_default()
273 sw->ports[14].config.max_in_hop_id = 9; in alloc_dev_default()
274 sw->ports[14].config.max_out_hop_id = 9; in alloc_dev_default()
275 sw->ports[14].cap_adap = -1; in alloc_dev_default()
277 sw->ports[15].disabled = true; in alloc_dev_default()
279 sw->ports[16].config.type = TB_TYPE_USB3_UP; in alloc_dev_default()
280 sw->ports[16].config.max_in_hop_id = 8; in alloc_dev_default()
281 sw->ports[16].config.max_out_hop_id = 8; in alloc_dev_default()
283 sw->ports[17].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
284 sw->ports[17].config.max_in_hop_id = 8; in alloc_dev_default()
285 sw->ports[17].config.max_out_hop_id = 8; in alloc_dev_default()
287 sw->ports[18].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
288 sw->ports[18].config.max_in_hop_id = 8; in alloc_dev_default()
289 sw->ports[18].config.max_out_hop_id = 8; in alloc_dev_default()
291 sw->ports[19].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
292 sw->ports[19].config.max_in_hop_id = 8; in alloc_dev_default()
293 sw->ports[19].config.max_out_hop_id = 8; in alloc_dev_default()
333 sw->ports[13].config.type = TB_TYPE_DP_HDMI_IN; in alloc_dev_with_dpin()
334 sw->ports[13].config.max_in_hop_id = 9; in alloc_dev_with_dpin()
335 sw->ports[13].config.max_out_hop_id = 9; in alloc_dev_with_dpin()
337 sw->ports[14].config.type = TB_TYPE_DP_HDMI_IN; in alloc_dev_with_dpin()
338 sw->ports[14].config.max_in_hop_id = 9; in alloc_dev_with_dpin()
339 sw->ports[14].config.max_out_hop_id = 9; in alloc_dev_with_dpin()
363 sw->ports[i].disabled = true; in alloc_dev_without_dp()
366 sw->ports[i].disabled = true; in alloc_dev_without_dp()
368 sw->ports[13].cap_adap = 0; in alloc_dev_without_dp()
369 sw->ports[14].cap_adap = 0; in alloc_dev_without_dp()
372 sw->ports[i].disabled = true; in alloc_dev_without_dp()
413 src_port = &host->ports[5]; in tb_test_path_basic()
432 src_port = &host->ports[12]; in tb_test_path_not_connected_walk()
433 dst_port = &dev->ports[16]; in tb_test_path_not_connected_walk()
439 KUNIT_EXPECT_PTR_EQ(test, p, &host->ports[3]); in tb_test_path_not_connected_walk()
450 KUNIT_EXPECT_PTR_EQ(test, p, &dev->ports[1]); in tb_test_path_not_connected_walk()
486 src_port = &host->ports[8]; in tb_test_path_single_hop_walk()
487 dst_port = &dev->ports[9]; in tb_test_path_single_hop_walk()
545 src_port = &host->ports[5]; in tb_test_path_daisy_chain_walk()
546 dst_port = &dev2->ports[13]; in tb_test_path_daisy_chain_walk()
608 src_port = &host->ports[5]; in tb_test_path_simple_tree_walk()
609 dst_port = &dev3->ports[13]; in tb_test_path_simple_tree_walk()
692 src_port = &dev3->ports[13]; in tb_test_path_complex_tree_walk()
693 dst_port = &dev9->ports[14]; in tb_test_path_complex_tree_walk()
795 src_port = &dev6->ports[13]; in tb_test_path_max_length_walk()
796 dst_port = &dev12->ports[13]; in tb_test_path_max_length_walk()
836 down = &dev1->ports[10]; in tb_test_path_not_connected()
837 up = &dev2->ports[9]; in tb_test_path_not_connected()
887 down = &host->ports[9]; in tb_test_path_not_bonded_lane0()
888 up = &dev->ports[9]; in tb_test_path_not_bonded_lane0()
949 in = &host->ports[5]; in tb_test_path_not_bonded_lane1()
950 out = &dev->ports[13]; in tb_test_path_not_bonded_lane1()
1029 in = &host->ports[5]; in tb_test_path_not_bonded_lane1_chain()
1030 out = &dev3->ports[13]; in tb_test_path_not_bonded_lane1_chain()
1109 in = &dev3->ports[13]; in tb_test_path_not_bonded_lane1_chain_reverse()
1110 out = &host->ports[5]; in tb_test_path_not_bonded_lane1_chain_reverse()
1201 in = &host->ports[5]; in tb_test_path_mixed_chain()
1202 out = &dev4->ports[13]; in tb_test_path_mixed_chain()
1293 in = &dev4->ports[13]; in tb_test_path_mixed_chain_reverse()
1294 out = &host->ports[5]; in tb_test_path_mixed_chain_reverse()
1338 down = &host->ports[8]; in tb_test_tunnel_pcie()
1339 up = &dev1->ports[9]; in tb_test_tunnel_pcie()
1353 down = &dev1->ports[10]; in tb_test_tunnel_pcie()
1354 up = &dev2->ports[9]; in tb_test_tunnel_pcie()
1389 in = &host->ports[5]; in tb_test_tunnel_dp()
1390 out = &dev->ports[13]; in tb_test_tunnel_dp()
1435 in = &host->ports[5]; in tb_test_tunnel_dp_chain()
1436 out = &dev4->ports[14]; in tb_test_tunnel_dp_chain()
1485 in = &dev2->ports[13]; in tb_test_tunnel_dp_tree()
1486 out = &dev5->ports[13]; in tb_test_tunnel_dp_tree()
1550 in = &dev6->ports[13]; in tb_test_tunnel_dp_max_length()
1551 out = &dev12->ports[13]; in tb_test_tunnel_dp_max_length()
1564 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1566 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1572 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1574 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1579 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1581 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1607 down = &host->ports[12]; in tb_test_tunnel_usb3()
1608 up = &dev1->ports[16]; in tb_test_tunnel_usb3()
1622 down = &dev1->ports[17]; in tb_test_tunnel_usb3()
1623 up = &dev2->ports[16]; in tb_test_tunnel_usb3()
1668 in = &dev2->ports[13]; in tb_test_tunnel_port_on_path()
1669 out = &dev5->ports[13]; in tb_test_tunnel_port_on_path()
1677 port = &host->ports[8]; in tb_test_tunnel_port_on_path()
1680 port = &host->ports[3]; in tb_test_tunnel_port_on_path()
1683 port = &dev1->ports[1]; in tb_test_tunnel_port_on_path()
1686 port = &dev1->ports[3]; in tb_test_tunnel_port_on_path()
1689 port = &dev1->ports[5]; in tb_test_tunnel_port_on_path()
1692 port = &dev1->ports[7]; in tb_test_tunnel_port_on_path()
1695 port = &dev3->ports[1]; in tb_test_tunnel_port_on_path()
1698 port = &dev5->ports[1]; in tb_test_tunnel_port_on_path()
1701 port = &dev4->ports[1]; in tb_test_tunnel_port_on_path()
1725 nhi = &host->ports[7]; in tb_test_tunnel_dma()
1726 port = &host->ports[1]; in tb_test_tunnel_dma()
1768 nhi = &host->ports[7]; in tb_test_tunnel_dma_rx()
1769 port = &host->ports[1]; in tb_test_tunnel_dma_rx()
1805 nhi = &host->ports[7]; in tb_test_tunnel_dma_tx()
1806 port = &host->ports[1]; in tb_test_tunnel_dma_tx()
1852 nhi = &host->ports[7]; in tb_test_tunnel_dma_chain()
1853 port = &dev2->ports[3]; in tb_test_tunnel_dma_chain()
1865 &dev2->ports[1]); in tb_test_tunnel_dma_chain()
1867 &dev1->ports[7]); in tb_test_tunnel_dma_chain()
1869 &dev1->ports[1]); in tb_test_tunnel_dma_chain()
1871 &host->ports[1]); in tb_test_tunnel_dma_chain()
1879 &dev1->ports[1]); in tb_test_tunnel_dma_chain()
1881 &dev1->ports[7]); in tb_test_tunnel_dma_chain()
1883 &dev2->ports[1]); in tb_test_tunnel_dma_chain()
1897 nhi = &host->ports[7]; in tb_test_tunnel_dma_match()
1898 port = &host->ports[1]; in tb_test_tunnel_dma_match()
1951 down = &host->ports[8]; in tb_test_credit_alloc_legacy_not_bonded()
1952 up = &dev->ports[9]; in tb_test_credit_alloc_legacy_not_bonded()
1984 down = &host->ports[8]; in tb_test_credit_alloc_legacy_bonded()
1985 up = &dev->ports[9]; in tb_test_credit_alloc_legacy_bonded()
2017 down = &host->ports[8]; in tb_test_credit_alloc_pcie()
2018 up = &dev->ports[9]; in tb_test_credit_alloc_pcie()
2065 down = &host->ports[8]; in tb_test_credit_alloc_without_dp()
2066 up = &dev->ports[9]; in tb_test_credit_alloc_without_dp()
2100 in = &host->ports[5]; in tb_test_credit_alloc_dp()
2101 out = &dev->ports[14]; in tb_test_credit_alloc_dp()
2144 down = &host->ports[12]; in tb_test_credit_alloc_usb3()
2145 up = &dev->ports[16]; in tb_test_credit_alloc_usb3()
2177 nhi = &host->ports[7]; in tb_test_credit_alloc_dma()
2178 port = &dev->ports[3]; in tb_test_credit_alloc_dma()
2213 nhi = &host->ports[7]; in tb_test_credit_alloc_dma_multiple()
2214 port = &dev->ports[3]; in tb_test_credit_alloc_dma_multiple()
2217 * Create three DMA tunnels through the same ports. With the in tb_test_credit_alloc_dma_multiple()
2307 down = &host->ports[8]; in TB_TEST_PCIE_TUNNEL()
2308 up = &dev->ports[9]; in TB_TEST_PCIE_TUNNEL()
2337 in = &host->ports[5]; in TB_TEST_DP_TUNNEL1()
2338 out = &dev->ports[13]; in TB_TEST_DP_TUNNEL1()
2374 in = &host->ports[6]; in TB_TEST_DP_TUNNEL2()
2375 out = &dev->ports[14]; in TB_TEST_DP_TUNNEL2()
2411 down = &host->ports[12]; in TB_TEST_USB3_TUNNEL()
2412 up = &dev->ports[16]; in TB_TEST_USB3_TUNNEL()
2441 nhi = &host->ports[7]; in TB_TEST_DMA_TUNNEL1()
2442 port = &dev->ports[3]; in TB_TEST_DMA_TUNNEL1()
2471 nhi = &host->ports[7]; in TB_TEST_DMA_TUNNEL2()
2472 port = &dev->ports[3]; in TB_TEST_DMA_TUNNEL2()