Lines Matching full:route
36 static struct tb_switch *alloc_switch(struct kunit *test, u64 route, in alloc_switch() argument
48 sw->config.depth = tb_route_length(route); in alloc_switch()
49 sw->config.route_hi = upper_32_bits(route); in alloc_switch()
50 sw->config.route_lo = lower_32_bits(route); in alloc_switch()
147 u64 route, bool bonded) in alloc_dev_default() argument
152 sw = alloc_switch(test, route, 1, 19); in alloc_dev_default()
256 port = tb_port_at(route, parent); in alloc_dev_default()
277 u64 route, bool bonded) in alloc_dev_with_dpin() argument
281 sw = alloc_dev_default(test, parent, route, bonded); in alloc_dev_with_dpin()
347 u64 route; member
364 { .route = 0x0, .port = 8, .type = TB_TYPE_PCIE_DOWN }, in tb_test_path_single_hop_walk()
365 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_single_hop_walk()
366 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_single_hop_walk()
367 { .route = 0x1, .port = 9, .type = TB_TYPE_PCIE_UP }, in tb_test_path_single_hop_walk()
384 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_single_hop_walk()
396 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_single_hop_walk()
420 { .route = 0x0, .port = 5, .type = TB_TYPE_DP_HDMI_IN }, in tb_test_path_daisy_chain_walk()
421 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_daisy_chain_walk()
422 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_daisy_chain_walk()
423 { .route = 0x1, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_daisy_chain_walk()
424 { .route = 0x301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_daisy_chain_walk()
425 { .route = 0x301, .port = 13, .type = TB_TYPE_DP_HDMI_OUT }, in tb_test_path_daisy_chain_walk()
443 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_daisy_chain_walk()
455 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_daisy_chain_walk()
481 { .route = 0x0, .port = 5, .type = TB_TYPE_DP_HDMI_IN }, in tb_test_path_simple_tree_walk()
482 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_simple_tree_walk()
483 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_simple_tree_walk()
484 { .route = 0x1, .port = 5, .type = TB_TYPE_PORT }, in tb_test_path_simple_tree_walk()
485 { .route = 0x501, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_simple_tree_walk()
486 { .route = 0x501, .port = 13, .type = TB_TYPE_DP_HDMI_OUT }, in tb_test_path_simple_tree_walk()
506 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_simple_tree_walk()
518 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_simple_tree_walk()
552 { .route = 0x50301, .port = 13, .type = TB_TYPE_DP_HDMI_IN }, in tb_test_path_complex_tree_walk()
553 { .route = 0x50301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
554 { .route = 0x301, .port = 5, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
555 { .route = 0x301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
556 { .route = 0x1, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
557 { .route = 0x1, .port = 7, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
558 { .route = 0x701, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
559 { .route = 0x701, .port = 7, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
560 { .route = 0x70701, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
561 { .route = 0x70701, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
562 { .route = 0x3070701, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
563 { .route = 0x3070701, .port = 5, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
564 { .route = 0x503070701, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_complex_tree_walk()
565 { .route = 0x503070701, .port = 14, .type = TB_TYPE_DP_HDMI_OUT }, in tb_test_path_complex_tree_walk()
590 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_complex_tree_walk()
602 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_complex_tree_walk()
643 { .route = 0x30303030301, .port = 13, .type = TB_TYPE_DP_HDMI_IN }, in tb_test_path_max_length_walk()
644 { .route = 0x30303030301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
645 { .route = 0x303030301, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
646 { .route = 0x303030301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
647 { .route = 0x3030301, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
648 { .route = 0x3030301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
649 { .route = 0x30301, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
650 { .route = 0x30301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
651 { .route = 0x301, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
652 { .route = 0x301, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
653 { .route = 0x1, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
654 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
655 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
656 { .route = 0x0, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
657 { .route = 0x3, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
658 { .route = 0x3, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
659 { .route = 0x303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
660 { .route = 0x303, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
661 { .route = 0x30303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
662 { .route = 0x30303, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
663 { .route = 0x3030303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
664 { .route = 0x3030303, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
665 { .route = 0x303030303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
666 { .route = 0x303030303, .port = 3, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
667 { .route = 0x30303030303, .port = 1, .type = TB_TYPE_PORT }, in tb_test_path_max_length_walk()
668 { .route = 0x30303030303, .port = 13, .type = TB_TYPE_DP_HDMI_OUT }, in tb_test_path_max_length_walk()
693 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_max_length_walk()
705 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_max_length_walk()
736 u64 route; member
755 .route = 0x0, in tb_test_path_not_bonded_lane0()
762 .route = 0x3, in tb_test_path_not_bonded_lane0()
789 KUNIT_EXPECT_EQ(test, tb_route(in_port->sw), test_data[i].route); in tb_test_path_not_bonded_lane0()
793 KUNIT_EXPECT_EQ(test, tb_route(out_port->sw), test_data[i].route); in tb_test_path_not_bonded_lane0()
817 .route = 0x0, in tb_test_path_not_bonded_lane1()
824 .route = 0x1, in tb_test_path_not_bonded_lane1()
851 KUNIT_EXPECT_EQ(test, tb_route(in_port->sw), test_data[i].route); in tb_test_path_not_bonded_lane1()
855 KUNIT_EXPECT_EQ(test, tb_route(out_port->sw), test_data[i].route); in tb_test_path_not_bonded_lane1()
881 .route = 0x0, in tb_test_path_not_bonded_lane1_chain()
888 .route = 0x1, in tb_test_path_not_bonded_lane1_chain()
895 .route = 0x701, in tb_test_path_not_bonded_lane1_chain()
902 .route = 0x50701, in tb_test_path_not_bonded_lane1_chain()
931 KUNIT_EXPECT_EQ(test, tb_route(in_port->sw), test_data[i].route); in tb_test_path_not_bonded_lane1_chain()
935 KUNIT_EXPECT_EQ(test, tb_route(out_port->sw), test_data[i].route); in tb_test_path_not_bonded_lane1_chain()
961 .route = 0x50701, in tb_test_path_not_bonded_lane1_chain_reverse()
968 .route = 0x701, in tb_test_path_not_bonded_lane1_chain_reverse()
975 .route = 0x1, in tb_test_path_not_bonded_lane1_chain_reverse()
982 .route = 0x0, in tb_test_path_not_bonded_lane1_chain_reverse()
1011 KUNIT_EXPECT_EQ(test, tb_route(in_port->sw), test_data[i].route); in tb_test_path_not_bonded_lane1_chain_reverse()
1015 KUNIT_EXPECT_EQ(test, tb_route(out_port->sw), test_data[i].route); in tb_test_path_not_bonded_lane1_chain_reverse()
1045 .route = 0x0, in tb_test_path_mixed_chain()
1052 .route = 0x1, in tb_test_path_mixed_chain()
1059 .route = 0x701, in tb_test_path_mixed_chain()
1066 .route = 0x50701, in tb_test_path_mixed_chain()
1073 .route = 0x3050701, in tb_test_path_mixed_chain()
1103 KUNIT_EXPECT_EQ(test, tb_route(in_port->sw), test_data[i].route); in tb_test_path_mixed_chain()
1107 KUNIT_EXPECT_EQ(test, tb_route(out_port->sw), test_data[i].route); in tb_test_path_mixed_chain()
1137 .route = 0x3050701, in tb_test_path_mixed_chain_reverse()
1144 .route = 0x50701, in tb_test_path_mixed_chain_reverse()
1151 .route = 0x701, in tb_test_path_mixed_chain_reverse()
1158 .route = 0x1, in tb_test_path_mixed_chain_reverse()
1165 .route = 0x0, in tb_test_path_mixed_chain_reverse()
1195 KUNIT_EXPECT_EQ(test, tb_route(in_port->sw), test_data[i].route); in tb_test_path_mixed_chain_reverse()
1199 KUNIT_EXPECT_EQ(test, tb_route(out_port->sw), test_data[i].route); in tb_test_path_mixed_chain_reverse()