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].dual_link_port = &sw->ports[2]; in alloc_host()
92 sw->ports[2].config.type = TB_TYPE_PORT; in alloc_host()
93 sw->ports[2].config.max_in_hop_id = 19; in alloc_host()
94 sw->ports[2].config.max_out_hop_id = 19; in alloc_host()
95 sw->ports[2].dual_link_port = &sw->ports[1]; in alloc_host()
96 sw->ports[2].link_nr = 1; in alloc_host()
98 sw->ports[3].config.type = TB_TYPE_PORT; in alloc_host()
99 sw->ports[3].config.max_in_hop_id = 19; in alloc_host()
100 sw->ports[3].config.max_out_hop_id = 19; in alloc_host()
101 sw->ports[3].dual_link_port = &sw->ports[4]; in alloc_host()
103 sw->ports[4].config.type = TB_TYPE_PORT; in alloc_host()
104 sw->ports[4].config.max_in_hop_id = 19; in alloc_host()
105 sw->ports[4].config.max_out_hop_id = 19; in alloc_host()
106 sw->ports[4].dual_link_port = &sw->ports[3]; in alloc_host()
107 sw->ports[4].link_nr = 1; in alloc_host()
109 sw->ports[5].config.type = TB_TYPE_DP_HDMI_IN; in alloc_host()
110 sw->ports[5].config.max_in_hop_id = 9; in alloc_host()
111 sw->ports[5].config.max_out_hop_id = 9; in alloc_host()
112 sw->ports[5].cap_adap = -1; in alloc_host()
114 sw->ports[6].config.type = TB_TYPE_DP_HDMI_IN; in alloc_host()
115 sw->ports[6].config.max_in_hop_id = 9; in alloc_host()
116 sw->ports[6].config.max_out_hop_id = 9; in alloc_host()
117 sw->ports[6].cap_adap = -1; in alloc_host()
119 sw->ports[7].config.type = TB_TYPE_NHI; in alloc_host()
120 sw->ports[7].config.max_in_hop_id = 11; in alloc_host()
121 sw->ports[7].config.max_out_hop_id = 11; in alloc_host()
123 sw->ports[8].config.type = TB_TYPE_PCIE_DOWN; in alloc_host()
124 sw->ports[8].config.max_in_hop_id = 8; in alloc_host()
125 sw->ports[8].config.max_out_hop_id = 8; in alloc_host()
127 sw->ports[9].config.type = TB_TYPE_PCIE_DOWN; in alloc_host()
128 sw->ports[9].config.max_in_hop_id = 8; in alloc_host()
129 sw->ports[9].config.max_out_hop_id = 8; in alloc_host()
131 sw->ports[10].disabled = true; in alloc_host()
132 sw->ports[11].disabled = true; in alloc_host()
134 sw->ports[12].config.type = TB_TYPE_USB3_DOWN; in alloc_host()
135 sw->ports[12].config.max_in_hop_id = 8; in alloc_host()
136 sw->ports[12].config.max_out_hop_id = 8; in alloc_host()
138 sw->ports[13].config.type = TB_TYPE_USB3_DOWN; in alloc_host()
139 sw->ports[13].config.max_in_hop_id = 8; in alloc_host()
140 sw->ports[13].config.max_out_hop_id = 8; in alloc_host()
159 sw->ports[0].config.type = TB_TYPE_PORT; in alloc_dev_default()
160 sw->ports[0].config.max_in_hop_id = 8; in alloc_dev_default()
161 sw->ports[0].config.max_out_hop_id = 8; in alloc_dev_default()
163 sw->ports[1].config.type = TB_TYPE_PORT; in alloc_dev_default()
164 sw->ports[1].config.max_in_hop_id = 19; in alloc_dev_default()
165 sw->ports[1].config.max_out_hop_id = 19; in alloc_dev_default()
166 sw->ports[1].dual_link_port = &sw->ports[2]; in alloc_dev_default()
168 sw->ports[2].config.type = TB_TYPE_PORT; in alloc_dev_default()
169 sw->ports[2].config.max_in_hop_id = 19; in alloc_dev_default()
170 sw->ports[2].config.max_out_hop_id = 19; in alloc_dev_default()
171 sw->ports[2].dual_link_port = &sw->ports[1]; in alloc_dev_default()
172 sw->ports[2].link_nr = 1; in alloc_dev_default()
174 sw->ports[3].config.type = TB_TYPE_PORT; in alloc_dev_default()
175 sw->ports[3].config.max_in_hop_id = 19; in alloc_dev_default()
176 sw->ports[3].config.max_out_hop_id = 19; in alloc_dev_default()
177 sw->ports[3].dual_link_port = &sw->ports[4]; in alloc_dev_default()
179 sw->ports[4].config.type = TB_TYPE_PORT; in alloc_dev_default()
180 sw->ports[4].config.max_in_hop_id = 19; in alloc_dev_default()
181 sw->ports[4].config.max_out_hop_id = 19; in alloc_dev_default()
182 sw->ports[4].dual_link_port = &sw->ports[3]; in alloc_dev_default()
183 sw->ports[4].link_nr = 1; in alloc_dev_default()
185 sw->ports[5].config.type = TB_TYPE_PORT; in alloc_dev_default()
186 sw->ports[5].config.max_in_hop_id = 19; in alloc_dev_default()
187 sw->ports[5].config.max_out_hop_id = 19; in alloc_dev_default()
188 sw->ports[5].dual_link_port = &sw->ports[6]; in alloc_dev_default()
190 sw->ports[6].config.type = TB_TYPE_PORT; in alloc_dev_default()
191 sw->ports[6].config.max_in_hop_id = 19; in alloc_dev_default()
192 sw->ports[6].config.max_out_hop_id = 19; in alloc_dev_default()
193 sw->ports[6].dual_link_port = &sw->ports[5]; in alloc_dev_default()
194 sw->ports[6].link_nr = 1; in alloc_dev_default()
196 sw->ports[7].config.type = TB_TYPE_PORT; in alloc_dev_default()
197 sw->ports[7].config.max_in_hop_id = 19; in alloc_dev_default()
198 sw->ports[7].config.max_out_hop_id = 19; in alloc_dev_default()
199 sw->ports[7].dual_link_port = &sw->ports[8]; in alloc_dev_default()
201 sw->ports[8].config.type = TB_TYPE_PORT; in alloc_dev_default()
202 sw->ports[8].config.max_in_hop_id = 19; in alloc_dev_default()
203 sw->ports[8].config.max_out_hop_id = 19; in alloc_dev_default()
204 sw->ports[8].dual_link_port = &sw->ports[7]; in alloc_dev_default()
205 sw->ports[8].link_nr = 1; in alloc_dev_default()
207 sw->ports[9].config.type = TB_TYPE_PCIE_UP; in alloc_dev_default()
208 sw->ports[9].config.max_in_hop_id = 8; in alloc_dev_default()
209 sw->ports[9].config.max_out_hop_id = 8; in alloc_dev_default()
211 sw->ports[10].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
212 sw->ports[10].config.max_in_hop_id = 8; in alloc_dev_default()
213 sw->ports[10].config.max_out_hop_id = 8; in alloc_dev_default()
215 sw->ports[11].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
216 sw->ports[11].config.max_in_hop_id = 8; in alloc_dev_default()
217 sw->ports[11].config.max_out_hop_id = 8; in alloc_dev_default()
219 sw->ports[12].config.type = TB_TYPE_PCIE_DOWN; in alloc_dev_default()
220 sw->ports[12].config.max_in_hop_id = 8; in alloc_dev_default()
221 sw->ports[12].config.max_out_hop_id = 8; in alloc_dev_default()
223 sw->ports[13].config.type = TB_TYPE_DP_HDMI_OUT; in alloc_dev_default()
224 sw->ports[13].config.max_in_hop_id = 9; in alloc_dev_default()
225 sw->ports[13].config.max_out_hop_id = 9; in alloc_dev_default()
226 sw->ports[13].cap_adap = -1; in alloc_dev_default()
228 sw->ports[14].config.type = TB_TYPE_DP_HDMI_OUT; in alloc_dev_default()
229 sw->ports[14].config.max_in_hop_id = 9; in alloc_dev_default()
230 sw->ports[14].config.max_out_hop_id = 9; in alloc_dev_default()
231 sw->ports[14].cap_adap = -1; in alloc_dev_default()
233 sw->ports[15].disabled = true; in alloc_dev_default()
235 sw->ports[16].config.type = TB_TYPE_USB3_UP; in alloc_dev_default()
236 sw->ports[16].config.max_in_hop_id = 8; in alloc_dev_default()
237 sw->ports[16].config.max_out_hop_id = 8; in alloc_dev_default()
239 sw->ports[17].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
240 sw->ports[17].config.max_in_hop_id = 8; in alloc_dev_default()
241 sw->ports[17].config.max_out_hop_id = 8; in alloc_dev_default()
243 sw->ports[18].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
244 sw->ports[18].config.max_in_hop_id = 8; in alloc_dev_default()
245 sw->ports[18].config.max_out_hop_id = 8; in alloc_dev_default()
247 sw->ports[19].config.type = TB_TYPE_USB3_DOWN; in alloc_dev_default()
248 sw->ports[19].config.max_in_hop_id = 8; in alloc_dev_default()
249 sw->ports[19].config.max_out_hop_id = 8; in alloc_dev_default()
285 sw->ports[13].config.type = TB_TYPE_DP_HDMI_IN; in alloc_dev_with_dpin()
286 sw->ports[13].config.max_in_hop_id = 9; in alloc_dev_with_dpin()
287 sw->ports[13].config.max_out_hop_id = 9; in alloc_dev_with_dpin()
289 sw->ports[14].config.type = TB_TYPE_DP_HDMI_IN; in alloc_dev_with_dpin()
290 sw->ports[14].config.max_in_hop_id = 9; in alloc_dev_with_dpin()
291 sw->ports[14].config.max_out_hop_id = 9; in alloc_dev_with_dpin()
303 src_port = &host->ports[5]; in tb_test_path_basic()
322 src_port = &host->ports[12]; in tb_test_path_not_connected_walk()
323 dst_port = &dev->ports[16]; in tb_test_path_not_connected_walk()
329 KUNIT_EXPECT_PTR_EQ(test, p, &host->ports[3]); in tb_test_path_not_connected_walk()
340 KUNIT_EXPECT_PTR_EQ(test, p, &dev->ports[1]); in tb_test_path_not_connected_walk()
376 src_port = &host->ports[8]; in tb_test_path_single_hop_walk()
377 dst_port = &dev->ports[9]; in tb_test_path_single_hop_walk()
435 src_port = &host->ports[5]; in tb_test_path_daisy_chain_walk()
436 dst_port = &dev2->ports[13]; in tb_test_path_daisy_chain_walk()
498 src_port = &host->ports[5]; in tb_test_path_simple_tree_walk()
499 dst_port = &dev3->ports[13]; in tb_test_path_simple_tree_walk()
582 src_port = &dev3->ports[13]; in tb_test_path_complex_tree_walk()
583 dst_port = &dev9->ports[14]; in tb_test_path_complex_tree_walk()
685 src_port = &dev6->ports[13]; in tb_test_path_max_length_walk()
686 dst_port = &dev12->ports[13]; in tb_test_path_max_length_walk()
726 down = &dev1->ports[10]; in tb_test_path_not_connected()
727 up = &dev2->ports[9]; in tb_test_path_not_connected()
777 down = &host->ports[9]; in tb_test_path_not_bonded_lane0()
778 up = &dev->ports[9]; in tb_test_path_not_bonded_lane0()
839 in = &host->ports[5]; in tb_test_path_not_bonded_lane1()
840 out = &dev->ports[13]; in tb_test_path_not_bonded_lane1()
919 in = &host->ports[5]; in tb_test_path_not_bonded_lane1_chain()
920 out = &dev3->ports[13]; in tb_test_path_not_bonded_lane1_chain()
999 in = &dev3->ports[13]; in tb_test_path_not_bonded_lane1_chain_reverse()
1000 out = &host->ports[5]; in tb_test_path_not_bonded_lane1_chain_reverse()
1091 in = &host->ports[5]; in tb_test_path_mixed_chain()
1092 out = &dev4->ports[13]; in tb_test_path_mixed_chain()
1183 in = &dev4->ports[13]; in tb_test_path_mixed_chain_reverse()
1184 out = &host->ports[5]; in tb_test_path_mixed_chain_reverse()
1228 down = &host->ports[8]; in tb_test_tunnel_pcie()
1229 up = &dev1->ports[9]; in tb_test_tunnel_pcie()
1243 down = &dev1->ports[10]; in tb_test_tunnel_pcie()
1244 up = &dev2->ports[9]; in tb_test_tunnel_pcie()
1279 in = &host->ports[5]; in tb_test_tunnel_dp()
1280 out = &dev->ports[13]; in tb_test_tunnel_dp()
1325 in = &host->ports[5]; in tb_test_tunnel_dp_chain()
1326 out = &dev4->ports[14]; in tb_test_tunnel_dp_chain()
1375 in = &dev2->ports[13]; in tb_test_tunnel_dp_tree()
1376 out = &dev5->ports[13]; in tb_test_tunnel_dp_tree()
1440 in = &dev6->ports[13]; in tb_test_tunnel_dp_max_length()
1441 out = &dev12->ports[13]; in tb_test_tunnel_dp_max_length()
1454 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1456 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1462 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1464 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1469 &host->ports[3]); in tb_test_tunnel_dp_max_length()
1471 &host->ports[1]); in tb_test_tunnel_dp_max_length()
1497 down = &host->ports[12]; in tb_test_tunnel_usb3()
1498 up = &dev1->ports[16]; in tb_test_tunnel_usb3()
1512 down = &dev1->ports[17]; in tb_test_tunnel_usb3()
1513 up = &dev2->ports[16]; in tb_test_tunnel_usb3()
1558 in = &dev2->ports[13]; in tb_test_tunnel_port_on_path()
1559 out = &dev5->ports[13]; in tb_test_tunnel_port_on_path()
1567 port = &host->ports[8]; in tb_test_tunnel_port_on_path()
1570 port = &host->ports[3]; in tb_test_tunnel_port_on_path()
1573 port = &dev1->ports[1]; in tb_test_tunnel_port_on_path()
1576 port = &dev1->ports[3]; in tb_test_tunnel_port_on_path()
1579 port = &dev1->ports[5]; in tb_test_tunnel_port_on_path()
1582 port = &dev1->ports[7]; in tb_test_tunnel_port_on_path()
1585 port = &dev3->ports[1]; in tb_test_tunnel_port_on_path()
1588 port = &dev5->ports[1]; in tb_test_tunnel_port_on_path()
1591 port = &dev4->ports[1]; in tb_test_tunnel_port_on_path()