Lines Matching +full:0 +full:x80000100
21 return 0; in __ida_init()
51 sw->config.enabled = 0; in alloc_switch()
59 for (i = 0; i <= sw->config.max_port_number; i++) { in alloc_switch()
76 sw = alloc_switch(test, 0, 7, 13); in alloc_host()
80 sw->config.vendor_id = 0x8086; in alloc_host()
81 sw->config.device_id = 0x9a1b; in alloc_host()
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()
130 sw->ports[7].config.nfc_credits = 0x41800000; in alloc_host()
166 sw->min_dp_main_credits = 0; in alloc_host_usb4()
201 sw->config.vendor_id = 0x8086; in alloc_dev_default()
202 sw->config.device_id = 0x15ef; in alloc_dev_default()
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()
329 port->dual_link_port->total_credits = 0; in alloc_dev_default()
333 upstream_port->dual_link_port->total_credits = 0; in alloc_dev_default()
385 sw->ports[13].cap_adap = 0; in alloc_dev_without_dp()
386 sw->ports[14].cap_adap = 0; in alloc_dev_without_dp()
394 sw->min_dp_aux_credits = 0; in alloc_dev_without_dp()
395 sw->min_dp_main_credits = 0; in alloc_dev_without_dp()
491 { .route = 0x0, .port = 8, .type = TB_TYPE_PCIE_DOWN }, in tb_test_path_single_hop_walk()
492 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_single_hop_walk()
493 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_single_hop_walk()
494 { .route = 0x1, .port = 9, .type = TB_TYPE_PCIE_UP }, in tb_test_path_single_hop_walk()
508 i = 0; in tb_test_path_single_hop_walk()
547 { .route = 0x0, .port = 5, .type = TB_TYPE_DP_HDMI_IN }, in tb_test_path_daisy_chain_walk()
548 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_daisy_chain_walk()
549 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_daisy_chain_walk()
550 { .route = 0x1, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_daisy_chain_walk()
551 { .route = 0x301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_daisy_chain_walk()
552 { .route = 0x301, .port = 13, .type = TB_TYPE_DP_HDMI_OUT }, in tb_test_path_daisy_chain_walk()
559 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_path_daisy_chain_walk()
560 dev2 = alloc_dev_default(test, dev1, 0x301, true); in tb_test_path_daisy_chain_walk()
567 i = 0; in tb_test_path_daisy_chain_walk()
608 { .route = 0x0, .port = 5, .type = TB_TYPE_DP_HDMI_IN }, in tb_test_path_simple_tree_walk()
609 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_simple_tree_walk()
610 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_simple_tree_walk()
611 { .route = 0x1, .port = 5, .type = TB_TYPE_PORT }, in tb_test_path_simple_tree_walk()
612 { .route = 0x501, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_simple_tree_walk()
613 { .route = 0x501, .port = 13, .type = TB_TYPE_DP_HDMI_OUT }, in tb_test_path_simple_tree_walk()
620 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_path_simple_tree_walk()
621 alloc_dev_default(test, dev1, 0x301, true); in tb_test_path_simple_tree_walk()
622 dev3 = alloc_dev_default(test, dev1, 0x501, true); in tb_test_path_simple_tree_walk()
623 alloc_dev_default(test, dev1, 0x701, true); in tb_test_path_simple_tree_walk()
630 i = 0; in tb_test_path_simple_tree_walk()
679 { .route = 0x50301, .port = 13, .type = TB_TYPE_DP_HDMI_IN }, in tb_test_path_complex_tree_walk()
680 { .route = 0x50301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
681 { .route = 0x301, .port = 5, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
682 { .route = 0x301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
683 { .route = 0x1, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
684 { .route = 0x1, .port = 7, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
685 { .route = 0x701, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
686 { .route = 0x701, .port = 7, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
687 { .route = 0x70701, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
688 { .route = 0x70701, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
689 { .route = 0x3070701, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
690 { .route = 0x3070701, .port = 5, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
691 { .route = 0x503070701, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
692 { .route = 0x503070701, .port = 14, .type = TB_TYPE_DP_HDMI_OUT }, in tb_test_path_complex_tree_walk()
699 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_path_complex_tree_walk()
700 dev2 = alloc_dev_default(test, dev1, 0x301, true); in tb_test_path_complex_tree_walk()
701 dev3 = alloc_dev_with_dpin(test, dev2, 0x50301, true); in tb_test_path_complex_tree_walk()
702 alloc_dev_default(test, dev1, 0x501, true); in tb_test_path_complex_tree_walk()
703 dev5 = alloc_dev_default(test, dev1, 0x701, true); in tb_test_path_complex_tree_walk()
704 dev6 = alloc_dev_default(test, dev5, 0x70701, true); in tb_test_path_complex_tree_walk()
705 dev7 = alloc_dev_default(test, dev6, 0x3070701, true); in tb_test_path_complex_tree_walk()
706 alloc_dev_default(test, dev7, 0x303070701, true); in tb_test_path_complex_tree_walk()
707 dev9 = alloc_dev_default(test, dev7, 0x503070701, true); in tb_test_path_complex_tree_walk()
714 i = 0; in tb_test_path_complex_tree_walk()
770 { .route = 0x30303030301, .port = 13, .type = TB_TYPE_DP_HDMI_IN }, in tb_test_path_max_length_walk()
771 { .route = 0x30303030301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
772 { .route = 0x303030301, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
773 { .route = 0x303030301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
774 { .route = 0x3030301, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
775 { .route = 0x3030301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
776 { .route = 0x30301, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
777 { .route = 0x30301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
778 { .route = 0x301, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
779 { .route = 0x301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
780 { .route = 0x1, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
781 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
782 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
783 { .route = 0x0, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
784 { .route = 0x3, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
785 { .route = 0x3, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
786 { .route = 0x303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
787 { .route = 0x303, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
788 { .route = 0x30303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
789 { .route = 0x30303, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
790 { .route = 0x3030303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
791 { .route = 0x3030303, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
792 { .route = 0x303030303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
793 { .route = 0x303030303, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
794 { .route = 0x30303030303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
795 { .route = 0x30303030303, .port = 13, .type = TB_TYPE_DP_HDMI_OUT }, in tb_test_path_max_length_walk()
799 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_path_max_length_walk()
800 dev2 = alloc_dev_default(test, dev1, 0x301, true); in tb_test_path_max_length_walk()
801 dev3 = alloc_dev_default(test, dev2, 0x30301, true); in tb_test_path_max_length_walk()
802 dev4 = alloc_dev_default(test, dev3, 0x3030301, true); in tb_test_path_max_length_walk()
803 dev5 = alloc_dev_default(test, dev4, 0x303030301, true); in tb_test_path_max_length_walk()
804 dev6 = alloc_dev_with_dpin(test, dev5, 0x30303030301, true); in tb_test_path_max_length_walk()
805 dev7 = alloc_dev_default(test, host, 0x3, true); in tb_test_path_max_length_walk()
806 dev8 = alloc_dev_default(test, dev7, 0x303, true); in tb_test_path_max_length_walk()
807 dev9 = alloc_dev_default(test, dev8, 0x30303, true); in tb_test_path_max_length_walk()
808 dev10 = alloc_dev_default(test, dev9, 0x3030303, true); in tb_test_path_max_length_walk()
809 dev11 = alloc_dev_default(test, dev10, 0x303030303, true); in tb_test_path_max_length_walk()
810 dev12 = alloc_dev_default(test, dev11, 0x30303030303, true); in tb_test_path_max_length_walk()
817 i = 0; in tb_test_path_max_length_walk()
849 dev1 = alloc_dev_default(test, host, 0x3, false); in tb_test_path_not_connected()
851 dev2 = alloc_dev_default(test, NULL, 0x303, false); in tb_test_path_not_connected()
856 path = tb_path_alloc(NULL, down, 8, up, 8, 0, "PCIe Down"); in tb_test_path_not_connected()
873 * PCIe path from host to device using lane 0. in tb_test_path_not_bonded_lane0()
882 .route = 0x0, in tb_test_path_not_bonded_lane0()
889 .route = 0x3, in tb_test_path_not_bonded_lane0()
902 dev = alloc_dev_default(test, host, 0x3, false); in tb_test_path_not_bonded_lane0()
907 path = tb_path_alloc(NULL, down, 8, up, 8, 0, "PCIe Down"); in tb_test_path_not_bonded_lane0()
910 for (i = 0; i < ARRAY_SIZE(test_data); i++) { in tb_test_path_not_bonded_lane0()
934 * paths like this (you either use lane 0 where lane 1 is in tb_test_path_not_bonded_lane1()
944 .route = 0x0, in tb_test_path_not_bonded_lane1()
951 .route = 0x1, in tb_test_path_not_bonded_lane1()
964 dev = alloc_dev_default(test, host, 0x1, false); in tb_test_path_not_bonded_lane1()
972 for (i = 0; i < ARRAY_SIZE(test_data); i++) { in tb_test_path_not_bonded_lane1()
1008 .route = 0x0, in tb_test_path_not_bonded_lane1_chain()
1015 .route = 0x1, in tb_test_path_not_bonded_lane1_chain()
1022 .route = 0x701, in tb_test_path_not_bonded_lane1_chain()
1029 .route = 0x50701, in tb_test_path_not_bonded_lane1_chain()
1042 dev1 = alloc_dev_default(test, host, 0x1, false); in tb_test_path_not_bonded_lane1_chain()
1043 dev2 = alloc_dev_default(test, dev1, 0x701, false); in tb_test_path_not_bonded_lane1_chain()
1044 dev3 = alloc_dev_default(test, dev2, 0x50701, false); in tb_test_path_not_bonded_lane1_chain()
1052 for (i = 0; i < ARRAY_SIZE(test_data); i++) { in tb_test_path_not_bonded_lane1_chain()
1088 .route = 0x50701, in tb_test_path_not_bonded_lane1_chain_reverse()
1095 .route = 0x701, in tb_test_path_not_bonded_lane1_chain_reverse()
1102 .route = 0x1, in tb_test_path_not_bonded_lane1_chain_reverse()
1109 .route = 0x0, in tb_test_path_not_bonded_lane1_chain_reverse()
1122 dev1 = alloc_dev_default(test, host, 0x1, false); in tb_test_path_not_bonded_lane1_chain_reverse()
1123 dev2 = alloc_dev_default(test, dev1, 0x701, false); in tb_test_path_not_bonded_lane1_chain_reverse()
1124 dev3 = alloc_dev_with_dpin(test, dev2, 0x50701, false); in tb_test_path_not_bonded_lane1_chain_reverse()
1132 for (i = 0; i < ARRAY_SIZE(test_data); i++) { in tb_test_path_not_bonded_lane1_chain_reverse()
1172 .route = 0x0, in tb_test_path_mixed_chain()
1179 .route = 0x1, in tb_test_path_mixed_chain()
1186 .route = 0x701, in tb_test_path_mixed_chain()
1193 .route = 0x50701, in tb_test_path_mixed_chain()
1200 .route = 0x3050701, in tb_test_path_mixed_chain()
1213 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_path_mixed_chain()
1214 dev2 = alloc_dev_default(test, dev1, 0x701, false); in tb_test_path_mixed_chain()
1215 dev3 = alloc_dev_default(test, dev2, 0x50701, false); in tb_test_path_mixed_chain()
1216 dev4 = alloc_dev_default(test, dev3, 0x3050701, true); in tb_test_path_mixed_chain()
1224 for (i = 0; i < ARRAY_SIZE(test_data); i++) { in tb_test_path_mixed_chain()
1264 .route = 0x3050701, in tb_test_path_mixed_chain_reverse()
1271 .route = 0x50701, in tb_test_path_mixed_chain_reverse()
1278 .route = 0x701, in tb_test_path_mixed_chain_reverse()
1285 .route = 0x1, in tb_test_path_mixed_chain_reverse()
1292 .route = 0x0, in tb_test_path_mixed_chain_reverse()
1305 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_path_mixed_chain_reverse()
1306 dev2 = alloc_dev_default(test, dev1, 0x701, false); in tb_test_path_mixed_chain_reverse()
1307 dev3 = alloc_dev_default(test, dev2, 0x50701, false); in tb_test_path_mixed_chain_reverse()
1308 dev4 = alloc_dev_default(test, dev3, 0x3050701, true); in tb_test_path_mixed_chain_reverse()
1316 for (i = 0; i < ARRAY_SIZE(test_data); i++) { in tb_test_path_mixed_chain_reverse()
1352 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_tunnel_pcie()
1353 dev2 = alloc_dev_default(test, dev1, 0x501, true); in tb_test_tunnel_pcie()
1363 KUNIT_ASSERT_EQ(test, tunnel1->paths[0]->path_length, 2); in tb_test_tunnel_pcie()
1364 KUNIT_EXPECT_PTR_EQ(test, tunnel1->paths[0]->hops[0].in_port, down); in tb_test_tunnel_pcie()
1365 KUNIT_EXPECT_PTR_EQ(test, tunnel1->paths[0]->hops[1].out_port, up); in tb_test_tunnel_pcie()
1367 KUNIT_EXPECT_PTR_EQ(test, tunnel1->paths[1]->hops[0].in_port, up); in tb_test_tunnel_pcie()
1378 KUNIT_ASSERT_EQ(test, tunnel2->paths[0]->path_length, 2); in tb_test_tunnel_pcie()
1379 KUNIT_EXPECT_PTR_EQ(test, tunnel2->paths[0]->hops[0].in_port, down); in tb_test_tunnel_pcie()
1380 KUNIT_EXPECT_PTR_EQ(test, tunnel2->paths[0]->hops[1].out_port, up); in tb_test_tunnel_pcie()
1382 KUNIT_EXPECT_PTR_EQ(test, tunnel2->paths[1]->hops[0].in_port, up); in tb_test_tunnel_pcie()
1404 dev = alloc_dev_default(test, host, 0x3, true); in tb_test_tunnel_dp()
1409 tunnel = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in tb_test_tunnel_dp()
1415 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 2); in tb_test_tunnel_dp()
1416 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, in); in tb_test_tunnel_dp()
1417 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[1].out_port, out); in tb_test_tunnel_dp()
1419 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, in); in tb_test_tunnel_dp()
1422 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[2]->hops[0].in_port, out); in tb_test_tunnel_dp()
1447 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_tunnel_dp_chain()
1448 alloc_dev_default(test, dev1, 0x301, true); in tb_test_tunnel_dp_chain()
1449 alloc_dev_default(test, dev1, 0x501, true); in tb_test_tunnel_dp_chain()
1450 dev4 = alloc_dev_default(test, dev1, 0x701, true); in tb_test_tunnel_dp_chain()
1455 tunnel = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in tb_test_tunnel_dp_chain()
1461 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 3); in tb_test_tunnel_dp_chain()
1462 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, in); in tb_test_tunnel_dp_chain()
1463 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[2].out_port, out); in tb_test_tunnel_dp_chain()
1465 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, in); in tb_test_tunnel_dp_chain()
1468 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[2]->hops[0].in_port, out); in tb_test_tunnel_dp_chain()
1496 dev1 = alloc_dev_default(test, host, 0x3, true); in tb_test_tunnel_dp_tree()
1497 dev2 = alloc_dev_with_dpin(test, dev1, 0x303, true); in tb_test_tunnel_dp_tree()
1498 dev3 = alloc_dev_default(test, dev1, 0x503, true); in tb_test_tunnel_dp_tree()
1499 alloc_dev_default(test, dev1, 0x703, true); in tb_test_tunnel_dp_tree()
1500 dev5 = alloc_dev_default(test, dev3, 0x50503, true); in tb_test_tunnel_dp_tree()
1505 tunnel = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in tb_test_tunnel_dp_tree()
1511 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 4); in tb_test_tunnel_dp_tree()
1512 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, in); in tb_test_tunnel_dp_tree()
1513 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[3].out_port, out); in tb_test_tunnel_dp_tree()
1515 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, in); in tb_test_tunnel_dp_tree()
1518 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[2]->hops[0].in_port, out); in tb_test_tunnel_dp_tree()
1554 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_tunnel_dp_max_length()
1555 dev2 = alloc_dev_default(test, dev1, 0x301, true); in tb_test_tunnel_dp_max_length()
1556 dev3 = alloc_dev_default(test, dev2, 0x30301, true); in tb_test_tunnel_dp_max_length()
1557 dev4 = alloc_dev_default(test, dev3, 0x3030301, true); in tb_test_tunnel_dp_max_length()
1558 dev5 = alloc_dev_default(test, dev4, 0x303030301, true); in tb_test_tunnel_dp_max_length()
1559 dev6 = alloc_dev_with_dpin(test, dev5, 0x30303030301, true); in tb_test_tunnel_dp_max_length()
1560 dev7 = alloc_dev_default(test, host, 0x3, true); in tb_test_tunnel_dp_max_length()
1561 dev8 = alloc_dev_default(test, dev7, 0x303, true); in tb_test_tunnel_dp_max_length()
1562 dev9 = alloc_dev_default(test, dev8, 0x30303, true); in tb_test_tunnel_dp_max_length()
1563 dev10 = alloc_dev_default(test, dev9, 0x3030303, true); in tb_test_tunnel_dp_max_length()
1564 dev11 = alloc_dev_default(test, dev10, 0x303030303, true); in tb_test_tunnel_dp_max_length()
1565 dev12 = alloc_dev_default(test, dev11, 0x30303030303, true); in tb_test_tunnel_dp_max_length()
1570 tunnel = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in tb_test_tunnel_dp_max_length()
1576 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 13); in tb_test_tunnel_dp_max_length()
1578 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, in); in tb_test_tunnel_dp_max_length()
1580 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[6].in_port, in tb_test_tunnel_dp_max_length()
1582 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[6].out_port, in tb_test_tunnel_dp_max_length()
1585 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[12].out_port, out); in tb_test_tunnel_dp_max_length()
1587 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, in); in tb_test_tunnel_dp_max_length()
1594 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[2]->hops[0].in_port, out); in tb_test_tunnel_dp_max_length()
1626 dev1 = alloc_dev_default(test, host, 0x3, true); in tb_test_tunnel_3dp()
1627 dev2 = alloc_dev_default(test, dev1, 0x303, true); in tb_test_tunnel_3dp()
1628 dev3 = alloc_dev_default(test, dev1, 0x503, true); in tb_test_tunnel_3dp()
1629 dev4 = alloc_dev_default(test, dev1, 0x703, true); in tb_test_tunnel_3dp()
1630 dev5 = alloc_dev_default(test, dev3, 0x50503, true); in tb_test_tunnel_3dp()
1640 tunnel1 = tb_tunnel_alloc_dp(NULL, in1, out1, 1, 0, 0); in tb_test_tunnel_3dp()
1646 KUNIT_ASSERT_EQ(test, tunnel1->paths[0]->path_length, 3); in tb_test_tunnel_3dp()
1648 tunnel2 = tb_tunnel_alloc_dp(NULL, in2, out2, 1, 0, 0); in tb_test_tunnel_3dp()
1654 KUNIT_ASSERT_EQ(test, tunnel2->paths[0]->path_length, 4); in tb_test_tunnel_3dp()
1656 tunnel3 = tb_tunnel_alloc_dp(NULL, in3, out3, 1, 0, 0); in tb_test_tunnel_3dp()
1662 KUNIT_ASSERT_EQ(test, tunnel3->paths[0]->path_length, 3); in tb_test_tunnel_3dp()
1686 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_tunnel_usb3()
1687 dev2 = alloc_dev_default(test, dev1, 0x701, true); in tb_test_tunnel_usb3()
1691 tunnel1 = tb_tunnel_alloc_usb3(NULL, up, down, 0, 0); in tb_test_tunnel_usb3()
1697 KUNIT_ASSERT_EQ(test, tunnel1->paths[0]->path_length, 2); in tb_test_tunnel_usb3()
1698 KUNIT_EXPECT_PTR_EQ(test, tunnel1->paths[0]->hops[0].in_port, down); in tb_test_tunnel_usb3()
1699 KUNIT_EXPECT_PTR_EQ(test, tunnel1->paths[0]->hops[1].out_port, up); in tb_test_tunnel_usb3()
1701 KUNIT_EXPECT_PTR_EQ(test, tunnel1->paths[1]->hops[0].in_port, up); in tb_test_tunnel_usb3()
1706 tunnel2 = tb_tunnel_alloc_usb3(NULL, up, down, 0, 0); in tb_test_tunnel_usb3()
1712 KUNIT_ASSERT_EQ(test, tunnel2->paths[0]->path_length, 2); in tb_test_tunnel_usb3()
1713 KUNIT_EXPECT_PTR_EQ(test, tunnel2->paths[0]->hops[0].in_port, down); in tb_test_tunnel_usb3()
1714 KUNIT_EXPECT_PTR_EQ(test, tunnel2->paths[0]->hops[1].out_port, up); in tb_test_tunnel_usb3()
1716 KUNIT_EXPECT_PTR_EQ(test, tunnel2->paths[1]->hops[0].in_port, up); in tb_test_tunnel_usb3()
1744 dev1 = alloc_dev_default(test, host, 0x3, true); in tb_test_tunnel_port_on_path()
1745 dev2 = alloc_dev_with_dpin(test, dev1, 0x303, true); in tb_test_tunnel_port_on_path()
1746 dev3 = alloc_dev_default(test, dev1, 0x503, true); in tb_test_tunnel_port_on_path()
1747 dev4 = alloc_dev_default(test, dev1, 0x703, true); in tb_test_tunnel_port_on_path()
1748 dev5 = alloc_dev_default(test, dev3, 0x50503, true); in tb_test_tunnel_port_on_path()
1753 dp_tunnel = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in tb_test_tunnel_port_on_path()
1817 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 1); in tb_test_tunnel_dma()
1818 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, port); in tb_test_tunnel_dma()
1819 KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 8); in tb_test_tunnel_dma()
1820 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, nhi); in tb_test_tunnel_dma()
1821 KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].next_hop_index, 1); in tb_test_tunnel_dma()
1824 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, nhi); in tb_test_tunnel_dma()
1825 KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[0].in_hop_index, 1); in tb_test_tunnel_dma()
1826 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].out_port, port); in tb_test_tunnel_dma()
1827 KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[0].next_hop_index, 8); in tb_test_tunnel_dma()
1860 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 1); in tb_test_tunnel_dma_rx()
1861 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, port); in tb_test_tunnel_dma_rx()
1862 KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 15); in tb_test_tunnel_dma_rx()
1863 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, nhi); in tb_test_tunnel_dma_rx()
1864 KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].next_hop_index, 2); in tb_test_tunnel_dma_rx()
1897 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 1); in tb_test_tunnel_dma_tx()
1898 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, nhi); in tb_test_tunnel_dma_tx()
1899 KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 2); in tb_test_tunnel_dma_tx()
1900 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, port); in tb_test_tunnel_dma_tx()
1901 KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].next_hop_index, 15); in tb_test_tunnel_dma_tx()
1931 dev1 = alloc_dev_default(test, host, 0x1, true); in tb_test_tunnel_dma_chain()
1932 dev2 = alloc_dev_default(test, dev1, 0x701, true); in tb_test_tunnel_dma_chain()
1943 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 3); in tb_test_tunnel_dma_chain()
1944 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, port); in tb_test_tunnel_dma_chain()
1945 KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[0].in_hop_index, 8); in tb_test_tunnel_dma_chain()
1946 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, in tb_test_tunnel_dma_chain()
1948 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[1].in_port, in tb_test_tunnel_dma_chain()
1950 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[1].out_port, in tb_test_tunnel_dma_chain()
1952 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[2].in_port, in tb_test_tunnel_dma_chain()
1954 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[2].out_port, nhi); in tb_test_tunnel_dma_chain()
1955 KUNIT_EXPECT_EQ(test, tunnel->paths[0]->hops[2].next_hop_index, 1); in tb_test_tunnel_dma_chain()
1958 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, nhi); in tb_test_tunnel_dma_chain()
1959 KUNIT_EXPECT_EQ(test, tunnel->paths[1]->hops[0].in_hop_index, 1); in tb_test_tunnel_dma_chain()
2031 dev = alloc_dev_default(test, host, 0x1, false); in tb_test_credit_alloc_legacy_not_bonded()
2039 path = tunnel->paths[0]; in tb_test_credit_alloc_legacy_not_bonded()
2041 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_legacy_not_bonded()
2042 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_legacy_not_bonded()
2043 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_legacy_not_bonded()
2048 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_legacy_not_bonded()
2049 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_legacy_not_bonded()
2050 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_legacy_not_bonded()
2064 dev = alloc_dev_default(test, host, 0x1, true); in tb_test_credit_alloc_legacy_bonded()
2072 path = tunnel->paths[0]; in tb_test_credit_alloc_legacy_bonded()
2074 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_legacy_bonded()
2075 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_legacy_bonded()
2076 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_legacy_bonded()
2081 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_legacy_bonded()
2082 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_legacy_bonded()
2083 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_legacy_bonded()
2097 dev = alloc_dev_usb4(test, host, 0x1, true); in tb_test_credit_alloc_pcie()
2105 path = tunnel->paths[0]; in tb_test_credit_alloc_pcie()
2107 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_pcie()
2108 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_pcie()
2109 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_pcie()
2114 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_pcie()
2115 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_pcie()
2116 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_pcie()
2130 dev = alloc_dev_without_dp(test, host, 0x1, true); in tb_test_credit_alloc_without_dp()
2133 * The device has no DP therefore baMinDPmain = baMinDPaux = 0 in tb_test_credit_alloc_without_dp()
2139 * baMinDPaux = 0 in tb_test_credit_alloc_without_dp()
2140 * baMinDPmain = 0 in tb_test_credit_alloc_without_dp()
2143 * Remaining Buffers = Total - (CP + DP) = 120 - (2 + 0) = 118 in tb_test_credit_alloc_without_dp()
2154 path = tunnel->paths[0]; in tb_test_credit_alloc_without_dp()
2156 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_without_dp()
2157 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_without_dp()
2158 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_without_dp()
2164 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_without_dp()
2165 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_without_dp()
2166 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_without_dp()
2180 dev = alloc_dev_usb4(test, host, 0x1, true); in tb_test_credit_alloc_dp()
2185 tunnel = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in tb_test_credit_alloc_dp()
2190 path = tunnel->paths[0]; in tb_test_credit_alloc_dp()
2192 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 12U); in tb_test_credit_alloc_dp()
2193 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dp()
2195 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 0U); in tb_test_credit_alloc_dp()
2200 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dp()
2201 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in tb_test_credit_alloc_dp()
2202 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dp()
2208 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dp()
2209 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in tb_test_credit_alloc_dp()
2210 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dp()
2224 dev = alloc_dev_usb4(test, host, 0x1, true); in tb_test_credit_alloc_usb3()
2228 tunnel = tb_tunnel_alloc_usb3(NULL, up, down, 0, 0); in tb_test_credit_alloc_usb3()
2232 path = tunnel->paths[0]; in tb_test_credit_alloc_usb3()
2234 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_usb3()
2235 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_usb3()
2236 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_usb3()
2241 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_usb3()
2242 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_usb3()
2243 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_usb3()
2257 dev = alloc_dev_usb4(test, host, 0x1, true); in tb_test_credit_alloc_dma()
2267 path = tunnel->paths[0]; in tb_test_credit_alloc_dma()
2269 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma()
2270 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in tb_test_credit_alloc_dma()
2271 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma()
2277 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma()
2278 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dma()
2279 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma()
2293 dev = alloc_dev_usb4(test, host, 0x1, true); in tb_test_credit_alloc_dma_multiple()
2305 * 120 - (2 + 2 * (1 + 0) + 32 + 64 + spare) = 20 in tb_test_credit_alloc_dma_multiple()
2320 path = tunnel1->paths[0]; in tb_test_credit_alloc_dma_multiple()
2322 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2323 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2324 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2329 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2330 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2331 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2338 path = tunnel2->paths[0]; in tb_test_credit_alloc_dma_multiple()
2340 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2341 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2342 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2347 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2348 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2349 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2364 path = tunnel3->paths[0]; in tb_test_credit_alloc_dma_multiple()
2366 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2367 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2368 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2373 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2374 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2375 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2395 path = pcie_tunnel->paths[0]; in TB_TEST_PCIE_TUNNEL()
2397 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_PCIE_TUNNEL()
2398 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in TB_TEST_PCIE_TUNNEL()
2399 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_PCIE_TUNNEL()
2404 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_PCIE_TUNNEL()
2405 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in TB_TEST_PCIE_TUNNEL()
2406 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_PCIE_TUNNEL()
2421 dp_tunnel1 = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in TB_TEST_DP_TUNNEL1()
2425 path = dp_tunnel1->paths[0]; in TB_TEST_DP_TUNNEL1()
2427 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 12U); in TB_TEST_DP_TUNNEL1()
2428 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in TB_TEST_DP_TUNNEL1()
2430 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 0U); in TB_TEST_DP_TUNNEL1()
2434 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DP_TUNNEL1()
2435 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in TB_TEST_DP_TUNNEL1()
2436 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DP_TUNNEL1()
2441 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DP_TUNNEL1()
2442 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in TB_TEST_DP_TUNNEL1()
2443 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DP_TUNNEL1()
2458 dp_tunnel2 = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in TB_TEST_DP_TUNNEL2()
2462 path = dp_tunnel2->paths[0]; in TB_TEST_DP_TUNNEL2()
2464 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 12U); in TB_TEST_DP_TUNNEL2()
2465 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in TB_TEST_DP_TUNNEL2()
2467 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 0U); in TB_TEST_DP_TUNNEL2()
2471 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DP_TUNNEL2()
2472 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in TB_TEST_DP_TUNNEL2()
2473 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DP_TUNNEL2()
2478 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DP_TUNNEL2()
2479 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in TB_TEST_DP_TUNNEL2()
2480 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DP_TUNNEL2()
2495 usb3_tunnel = tb_tunnel_alloc_usb3(NULL, up, down, 0, 0); in TB_TEST_USB3_TUNNEL()
2499 path = usb3_tunnel->paths[0]; in TB_TEST_USB3_TUNNEL()
2501 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_USB3_TUNNEL()
2502 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in TB_TEST_USB3_TUNNEL()
2503 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_USB3_TUNNEL()
2508 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_USB3_TUNNEL()
2509 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in TB_TEST_USB3_TUNNEL()
2510 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_USB3_TUNNEL()
2529 path = dma_tunnel1->paths[0]; in TB_TEST_DMA_TUNNEL1()
2531 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2532 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in TB_TEST_DMA_TUNNEL1()
2533 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2538 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2539 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2540 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2559 path = dma_tunnel2->paths[0]; in TB_TEST_DMA_TUNNEL2()
2561 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2562 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in TB_TEST_DMA_TUNNEL2()
2563 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2568 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2569 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2570 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2589 dev = alloc_dev_usb4(test, host, 0x1, true); in tb_test_credit_alloc_all()
2607 0x55584401, /* "UXD" v1 */
2608 0x00000018, /* Root directory length */
2609 0x76656e64, /* "vend" */
2610 0x6f726964, /* "orid" */
2611 0x76000001, /* "v" R 1 */
2612 0x00000a27, /* Immediate value, ! Vendor ID */
2613 0x76656e64, /* "vend" */
2614 0x6f726964, /* "orid" */
2615 0x74000003, /* "t" R 3 */
2616 0x0000001a, /* Text leaf offset, (“Apple Inc.”) */
2617 0x64657669, /* "devi" */
2618 0x63656964, /* "ceid" */
2619 0x76000001, /* "v" R 1 */
2620 0x0000000a, /* Immediate value, ! Device ID */
2621 0x64657669, /* "devi" */
2622 0x63656964, /* "ceid" */
2623 0x74000003, /* "t" R 3 */
2624 0x0000001d, /* Text leaf offset, (“Macintosh”) */
2625 0x64657669, /* "devi" */
2626 0x63657276, /* "cerv" */
2627 0x76000001, /* "v" R 1 */
2628 0x80000100, /* Immediate value, Device Revision */
2629 0x6e657477, /* "netw" */
2630 0x6f726b00, /* "ork" */
2631 0x44000014, /* "D" R 20 */
2632 0x00000021, /* Directory data offset, (Network Directory) */
2633 0x4170706c, /* "Appl" */
2634 0x6520496e, /* "e In" */
2635 0x632e0000, /* "c." ! */
2636 0x4d616369, /* "Maci" */
2637 0x6e746f73, /* "ntos" */
2638 0x68000000, /* "h" */
2639 0x00000000, /* padding */
2640 0xca8961c6, /* Directory UUID, Network Directory */
2641 0x9541ce1c, /* Directory UUID, Network Directory */
2642 0x5949b8bd, /* Directory UUID, Network Directory */
2643 0x4f5a5f2e, /* Directory UUID, Network Directory */
2644 0x70727463, /* "prtc" */
2645 0x69640000, /* "id" */
2646 0x76000001, /* "v" R 1 */
2647 0x00000001, /* Immediate value, Network Protocol ID */
2648 0x70727463, /* "prtc" */
2649 0x76657273, /* "vers" */
2650 0x76000001, /* "v" R 1 */
2651 0x00000001, /* Immediate value, Network Protocol Version */
2652 0x70727463, /* "prtc" */
2653 0x72657673, /* "revs" */
2654 0x76000001, /* "v" R 1 */
2655 0x00000001, /* Immediate value, Network Protocol Revision */
2656 0x70727463, /* "prtc" */
2657 0x73746e73, /* "stns" */
2658 0x76000001, /* "v" R 1 */
2659 0x00000000, /* Immediate value, Network Protocol Settings */
2663 UUID_INIT(0xc66189ca, 0x1cce, 0x4195,
2664 0xbd, 0xb8, 0x49, 0x59, 0x2e, 0x5f, 0x5a, 0x4f);
2683 KUNIT_EXPECT_EQ(test, p->value.immediate, 0xa27); in tb_test_property_parse()
2691 KUNIT_EXPECT_EQ(test, p->value.immediate, 0xa); in tb_test_property_parse()
2704 KUNIT_EXPECT_EQ(test, p->value.immediate, 0x1); in tb_test_property_parse()
2708 KUNIT_EXPECT_EQ(test, p->value.immediate, 0x1); in tb_test_property_parse()
2712 KUNIT_EXPECT_EQ(test, p->value.immediate, 0x1); in tb_test_property_parse()
2716 KUNIT_EXPECT_EQ(test, p->value.immediate, 0x0); in tb_test_property_parse()
2736 ret = tb_property_format_dir(dir, NULL, 0); in tb_test_property_format()
2745 KUNIT_EXPECT_EQ(test, ret, 0); in tb_test_property_format()
2747 for (i = 0; i < ARRAY_SIZE(root_directory); i++) in tb_test_property_format()
2766 n1 = 0; in compare_dirs()
2769 KUNIT_ASSERT_NE(test, n1, 0); in compare_dirs()
2771 n2 = 0; in compare_dirs()
2774 KUNIT_ASSERT_NE(test, n2, 0); in compare_dirs()
2780 for (i = 0; i < n1; i++) { in compare_dirs()
2786 KUNIT_ASSERT_STREQ(test, &p1->key[0], &p2->key[0]); in compare_dirs()
2839 ret = tb_property_format_dir(dst, NULL, 0); in tb_test_property_copy()
2848 for (i = 0; i < ARRAY_SIZE(root_directory); i++) in tb_test_property_copy()