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()
372 src_port = &host->ports[5]; in tb_test_path_basic()
391 src_port = &host->ports[12]; in tb_test_path_not_connected_walk()
392 dst_port = &dev->ports[16]; in tb_test_path_not_connected_walk()
398 KUNIT_EXPECT_PTR_EQ(test, p, &host->ports[3]); in tb_test_path_not_connected_walk()
409 KUNIT_EXPECT_PTR_EQ(test, p, &dev->ports[1]); in tb_test_path_not_connected_walk()
445 src_port = &host->ports[8]; in tb_test_path_single_hop_walk()
446 dst_port = &dev->ports[9]; in tb_test_path_single_hop_walk()
504 src_port = &host->ports[5]; in tb_test_path_daisy_chain_walk()
505 dst_port = &dev2->ports[13]; in tb_test_path_daisy_chain_walk()
567 src_port = &host->ports[5]; in tb_test_path_simple_tree_walk()
568 dst_port = &dev3->ports[13]; in tb_test_path_simple_tree_walk()
651 src_port = &dev3->ports[13]; in tb_test_path_complex_tree_walk()
652 dst_port = &dev9->ports[14]; in tb_test_path_complex_tree_walk()
754 src_port = &dev6->ports[13]; in tb_test_path_max_length_walk()
755 dst_port = &dev12->ports[13]; in tb_test_path_max_length_walk()
795 down = &dev1->ports[10]; in tb_test_path_not_connected()
796 up = &dev2->ports[9]; in tb_test_path_not_connected()
846 down = &host->ports[9]; in tb_test_path_not_bonded_lane0()
847 up = &dev->ports[9]; in tb_test_path_not_bonded_lane0()
908 in = &host->ports[5]; in tb_test_path_not_bonded_lane1()
909 out = &dev->ports[13]; in tb_test_path_not_bonded_lane1()
988 in = &host->ports[5]; in tb_test_path_not_bonded_lane1_chain()
989 out = &dev3->ports[13]; in tb_test_path_not_bonded_lane1_chain()
1068 in = &dev3->ports[13]; in tb_test_path_not_bonded_lane1_chain_reverse()
1069 out = &host->ports[5]; in tb_test_path_not_bonded_lane1_chain_reverse()
1160 in = &host->ports[5]; in tb_test_path_mixed_chain()
1161 out = &dev4->ports[13]; in tb_test_path_mixed_chain()
1252 in = &dev4->ports[13]; in tb_test_path_mixed_chain_reverse()
1253 out = &host->ports[5]; in tb_test_path_mixed_chain_reverse()
1297 down = &host->ports[8]; in tb_test_tunnel_pcie()
1298 up = &dev1->ports[9]; in tb_test_tunnel_pcie()
1312 down = &dev1->ports[10]; in tb_test_tunnel_pcie()
1313 up = &dev2->ports[9]; in tb_test_tunnel_pcie()
1348 in = &host->ports[5]; in tb_test_tunnel_dp()
1349 out = &dev->ports[13]; in tb_test_tunnel_dp()
1394 in = &host->ports[5]; in tb_test_tunnel_dp_chain()
1395 out = &dev4->ports[14]; in tb_test_tunnel_dp_chain()
1444 in = &dev2->ports[13]; in tb_test_tunnel_dp_tree()
1445 out = &dev5->ports[13]; in tb_test_tunnel_dp_tree()
1509 in = &dev6->ports[13]; in tb_test_tunnel_dp_max_length()
1510 out = &dev12->ports[13]; in tb_test_tunnel_dp_max_length()
1523 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1525 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1531 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1533 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1538 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1540 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1566 down = &host->ports[12]; in tb_test_tunnel_usb3()
1567 up = &dev1->ports[16]; in tb_test_tunnel_usb3()
1581 down = &dev1->ports[17]; in tb_test_tunnel_usb3()
1582 up = &dev2->ports[16]; in tb_test_tunnel_usb3()
1627 in = &dev2->ports[13]; in tb_test_tunnel_port_on_path()
1628 out = &dev5->ports[13]; in tb_test_tunnel_port_on_path()
1636 port = &host->ports[8]; in tb_test_tunnel_port_on_path()
1639 port = &host->ports[3]; in tb_test_tunnel_port_on_path()
1642 port = &dev1->ports[1]; in tb_test_tunnel_port_on_path()
1645 port = &dev1->ports[3]; in tb_test_tunnel_port_on_path()
1648 port = &dev1->ports[5]; in tb_test_tunnel_port_on_path()
1651 port = &dev1->ports[7]; in tb_test_tunnel_port_on_path()
1654 port = &dev3->ports[1]; in tb_test_tunnel_port_on_path()
1657 port = &dev5->ports[1]; in tb_test_tunnel_port_on_path()
1660 port = &dev4->ports[1]; in tb_test_tunnel_port_on_path()
1684 nhi = &host->ports[7]; in tb_test_tunnel_dma()
1685 port = &host->ports[1]; in tb_test_tunnel_dma()
1727 nhi = &host->ports[7]; in tb_test_tunnel_dma_rx()
1728 port = &host->ports[1]; in tb_test_tunnel_dma_rx()
1764 nhi = &host->ports[7]; in tb_test_tunnel_dma_tx()
1765 port = &host->ports[1]; in tb_test_tunnel_dma_tx()
1811 nhi = &host->ports[7]; in tb_test_tunnel_dma_chain()
1812 port = &dev2->ports[3]; in tb_test_tunnel_dma_chain()
1824 &dev2->ports[1]); in tb_test_tunnel_dma_chain()
1826 &dev1->ports[7]); in tb_test_tunnel_dma_chain()
1828 &dev1->ports[1]); in tb_test_tunnel_dma_chain()
1830 &host->ports[1]); in tb_test_tunnel_dma_chain()
1838 &dev1->ports[1]); in tb_test_tunnel_dma_chain()
1840 &dev1->ports[7]); in tb_test_tunnel_dma_chain()
1842 &dev2->ports[1]); in tb_test_tunnel_dma_chain()
1856 nhi = &host->ports[7]; in tb_test_tunnel_dma_match()
1857 port = &host->ports[1]; in tb_test_tunnel_dma_match()
1910 down = &host->ports[8]; in tb_test_credit_alloc_legacy_not_bonded()
1911 up = &dev->ports[9]; in tb_test_credit_alloc_legacy_not_bonded()
1943 down = &host->ports[8]; in tb_test_credit_alloc_legacy_bonded()
1944 up = &dev->ports[9]; in tb_test_credit_alloc_legacy_bonded()
1976 down = &host->ports[8]; in tb_test_credit_alloc_pcie()
1977 up = &dev->ports[9]; in tb_test_credit_alloc_pcie()
2009 in = &host->ports[5]; in tb_test_credit_alloc_dp()
2010 out = &dev->ports[14]; in tb_test_credit_alloc_dp()
2053 down = &host->ports[12]; in tb_test_credit_alloc_usb3()
2054 up = &dev->ports[16]; in tb_test_credit_alloc_usb3()
2086 nhi = &host->ports[7]; in tb_test_credit_alloc_dma()
2087 port = &dev->ports[3]; in tb_test_credit_alloc_dma()
2122 nhi = &host->ports[7]; in tb_test_credit_alloc_dma_multiple()
2123 port = &dev->ports[3]; in tb_test_credit_alloc_dma_multiple()
2126 * Create three DMA tunnels through the same ports. With the in tb_test_credit_alloc_dma_multiple()
2216 down = &host->ports[8]; in TB_TEST_PCIE_TUNNEL()
2217 up = &dev->ports[9]; in TB_TEST_PCIE_TUNNEL()
2246 in = &host->ports[5]; in TB_TEST_DP_TUNNEL1()
2247 out = &dev->ports[13]; in TB_TEST_DP_TUNNEL1()
2283 in = &host->ports[6]; in TB_TEST_DP_TUNNEL2()
2284 out = &dev->ports[14]; in TB_TEST_DP_TUNNEL2()
2320 down = &host->ports[12]; in TB_TEST_USB3_TUNNEL()
2321 up = &dev->ports[16]; in TB_TEST_USB3_TUNNEL()
2350 nhi = &host->ports[7]; in TB_TEST_DMA_TUNNEL1()
2351 port = &dev->ports[3]; in TB_TEST_DMA_TUNNEL1()
2380 nhi = &host->ports[7]; in TB_TEST_DMA_TUNNEL2()
2381 port = &dev->ports[3]; in TB_TEST_DMA_TUNNEL2()