Lines Matching refs:path
829 struct tb_path *path; in tb_test_path_not_connected() local
839 path = tb_path_alloc(NULL, down, 8, up, 8, 0, "PCIe Down"); in tb_test_path_not_connected()
840 KUNIT_ASSERT_NULL(test, path); in tb_test_path_not_connected()
841 path = tb_path_alloc(NULL, down, 8, up, 8, 1, "PCIe Down"); in tb_test_path_not_connected()
842 KUNIT_ASSERT_NULL(test, path); in tb_test_path_not_connected()
881 struct tb_path *path; in tb_test_path_not_bonded_lane0() local
890 path = tb_path_alloc(NULL, down, 8, up, 8, 0, "PCIe Down"); in tb_test_path_not_bonded_lane0()
891 KUNIT_ASSERT_NOT_NULL(test, path); in tb_test_path_not_bonded_lane0()
892 KUNIT_ASSERT_EQ(test, path->path_length, ARRAY_SIZE(test_data)); in tb_test_path_not_bonded_lane0()
896 in_port = path->hops[i].in_port; in tb_test_path_not_bonded_lane0()
897 out_port = path->hops[i].out_port; in tb_test_path_not_bonded_lane0()
908 tb_path_free(path); in tb_test_path_not_bonded_lane0()
943 struct tb_path *path; in tb_test_path_not_bonded_lane1() local
952 path = tb_path_alloc(NULL, in, 9, out, 9, 1, "Video"); in tb_test_path_not_bonded_lane1()
953 KUNIT_ASSERT_NOT_NULL(test, path); in tb_test_path_not_bonded_lane1()
954 KUNIT_ASSERT_EQ(test, path->path_length, ARRAY_SIZE(test_data)); in tb_test_path_not_bonded_lane1()
958 in_port = path->hops[i].in_port; in tb_test_path_not_bonded_lane1()
959 out_port = path->hops[i].out_port; in tb_test_path_not_bonded_lane1()
970 tb_path_free(path); in tb_test_path_not_bonded_lane1()
1021 struct tb_path *path; in tb_test_path_not_bonded_lane1_chain() local
1032 path = tb_path_alloc(NULL, in, 9, out, 9, 1, "Video"); in tb_test_path_not_bonded_lane1_chain()
1033 KUNIT_ASSERT_NOT_NULL(test, path); in tb_test_path_not_bonded_lane1_chain()
1034 KUNIT_ASSERT_EQ(test, path->path_length, ARRAY_SIZE(test_data)); in tb_test_path_not_bonded_lane1_chain()
1038 in_port = path->hops[i].in_port; in tb_test_path_not_bonded_lane1_chain()
1039 out_port = path->hops[i].out_port; in tb_test_path_not_bonded_lane1_chain()
1050 tb_path_free(path); in tb_test_path_not_bonded_lane1_chain()
1101 struct tb_path *path; in tb_test_path_not_bonded_lane1_chain_reverse() local
1112 path = tb_path_alloc(NULL, in, 9, out, 9, 1, "Video"); in tb_test_path_not_bonded_lane1_chain_reverse()
1113 KUNIT_ASSERT_NOT_NULL(test, path); in tb_test_path_not_bonded_lane1_chain_reverse()
1114 KUNIT_ASSERT_EQ(test, path->path_length, ARRAY_SIZE(test_data)); in tb_test_path_not_bonded_lane1_chain_reverse()
1118 in_port = path->hops[i].in_port; in tb_test_path_not_bonded_lane1_chain_reverse()
1119 out_port = path->hops[i].out_port; in tb_test_path_not_bonded_lane1_chain_reverse()
1130 tb_path_free(path); in tb_test_path_not_bonded_lane1_chain_reverse()
1192 struct tb_path *path; in tb_test_path_mixed_chain() local
1204 path = tb_path_alloc(NULL, in, 9, out, 9, 1, "Video"); in tb_test_path_mixed_chain()
1205 KUNIT_ASSERT_NOT_NULL(test, path); in tb_test_path_mixed_chain()
1206 KUNIT_ASSERT_EQ(test, path->path_length, ARRAY_SIZE(test_data)); in tb_test_path_mixed_chain()
1210 in_port = path->hops[i].in_port; in tb_test_path_mixed_chain()
1211 out_port = path->hops[i].out_port; in tb_test_path_mixed_chain()
1222 tb_path_free(path); in tb_test_path_mixed_chain()
1284 struct tb_path *path; in tb_test_path_mixed_chain_reverse() local
1296 path = tb_path_alloc(NULL, in, 9, out, 9, 1, "Video"); in tb_test_path_mixed_chain_reverse()
1297 KUNIT_ASSERT_NOT_NULL(test, path); in tb_test_path_mixed_chain_reverse()
1298 KUNIT_ASSERT_EQ(test, path->path_length, ARRAY_SIZE(test_data)); in tb_test_path_mixed_chain_reverse()
1302 in_port = path->hops[i].in_port; in tb_test_path_mixed_chain_reverse()
1303 out_port = path->hops[i].out_port; in tb_test_path_mixed_chain_reverse()
1314 tb_path_free(path); in tb_test_path_mixed_chain_reverse()
1946 struct tb_path *path; in tb_test_credit_alloc_legacy_not_bonded() local
1957 path = tunnel->paths[0]; in tb_test_credit_alloc_legacy_not_bonded()
1958 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_legacy_not_bonded()
1959 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_legacy_not_bonded()
1960 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_legacy_not_bonded()
1961 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_legacy_not_bonded()
1962 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 16U); in tb_test_credit_alloc_legacy_not_bonded()
1964 path = tunnel->paths[1]; in tb_test_credit_alloc_legacy_not_bonded()
1965 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_legacy_not_bonded()
1966 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_legacy_not_bonded()
1967 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_legacy_not_bonded()
1968 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_legacy_not_bonded()
1969 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 16U); in tb_test_credit_alloc_legacy_not_bonded()
1979 struct tb_path *path; in tb_test_credit_alloc_legacy_bonded() local
1990 path = tunnel->paths[0]; in tb_test_credit_alloc_legacy_bonded()
1991 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_legacy_bonded()
1992 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_legacy_bonded()
1993 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_legacy_bonded()
1994 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_legacy_bonded()
1995 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 32U); in tb_test_credit_alloc_legacy_bonded()
1997 path = tunnel->paths[1]; in tb_test_credit_alloc_legacy_bonded()
1998 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_legacy_bonded()
1999 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_legacy_bonded()
2000 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_legacy_bonded()
2001 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_legacy_bonded()
2002 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 32U); in tb_test_credit_alloc_legacy_bonded()
2012 struct tb_path *path; in tb_test_credit_alloc_pcie() local
2023 path = tunnel->paths[0]; in tb_test_credit_alloc_pcie()
2024 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_pcie()
2025 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_pcie()
2026 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_pcie()
2027 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_pcie()
2028 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 32U); in tb_test_credit_alloc_pcie()
2030 path = tunnel->paths[1]; in tb_test_credit_alloc_pcie()
2031 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_pcie()
2032 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_pcie()
2033 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_pcie()
2034 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_pcie()
2035 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 64U); in tb_test_credit_alloc_pcie()
2045 struct tb_path *path; in tb_test_credit_alloc_without_dp() local
2072 path = tunnel->paths[0]; in tb_test_credit_alloc_without_dp()
2073 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_without_dp()
2074 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_without_dp()
2075 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_without_dp()
2076 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_without_dp()
2077 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 9U); in tb_test_credit_alloc_without_dp()
2080 path = tunnel->paths[1]; in tb_test_credit_alloc_without_dp()
2081 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_without_dp()
2082 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_without_dp()
2083 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_without_dp()
2084 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_without_dp()
2085 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 64U); in tb_test_credit_alloc_without_dp()
2095 struct tb_path *path; in tb_test_credit_alloc_dp() local
2108 path = tunnel->paths[0]; in tb_test_credit_alloc_dp()
2109 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dp()
2110 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 12U); in tb_test_credit_alloc_dp()
2111 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dp()
2112 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 18U); in tb_test_credit_alloc_dp()
2113 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 0U); in tb_test_credit_alloc_dp()
2116 path = tunnel->paths[1]; in tb_test_credit_alloc_dp()
2117 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dp()
2118 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dp()
2119 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in tb_test_credit_alloc_dp()
2120 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dp()
2121 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in tb_test_credit_alloc_dp()
2124 path = tunnel->paths[2]; in tb_test_credit_alloc_dp()
2125 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dp()
2126 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dp()
2127 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in tb_test_credit_alloc_dp()
2128 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dp()
2129 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in tb_test_credit_alloc_dp()
2139 struct tb_path *path; in tb_test_credit_alloc_usb3() local
2150 path = tunnel->paths[0]; in tb_test_credit_alloc_usb3()
2151 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_usb3()
2152 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_usb3()
2153 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_usb3()
2154 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_usb3()
2155 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in tb_test_credit_alloc_usb3()
2157 path = tunnel->paths[1]; in tb_test_credit_alloc_usb3()
2158 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_usb3()
2159 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_usb3()
2160 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in tb_test_credit_alloc_usb3()
2161 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_usb3()
2162 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 32U); in tb_test_credit_alloc_usb3()
2172 struct tb_path *path; in tb_test_credit_alloc_dma() local
2185 path = tunnel->paths[0]; in tb_test_credit_alloc_dma()
2186 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dma()
2187 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma()
2188 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in tb_test_credit_alloc_dma()
2189 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma()
2190 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in tb_test_credit_alloc_dma()
2193 path = tunnel->paths[1]; in tb_test_credit_alloc_dma()
2194 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dma()
2195 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma()
2196 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dma()
2197 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma()
2198 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in tb_test_credit_alloc_dma()
2208 struct tb_path *path; in tb_test_credit_alloc_dma_multiple() local
2238 path = tunnel1->paths[0]; in tb_test_credit_alloc_dma_multiple()
2239 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dma_multiple()
2240 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2241 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2242 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2243 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2245 path = tunnel1->paths[1]; in tb_test_credit_alloc_dma_multiple()
2246 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dma_multiple()
2247 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2248 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2249 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2250 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2256 path = tunnel2->paths[0]; in tb_test_credit_alloc_dma_multiple()
2257 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dma_multiple()
2258 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2259 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2260 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2261 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in tb_test_credit_alloc_dma_multiple()
2263 path = tunnel2->paths[1]; in tb_test_credit_alloc_dma_multiple()
2264 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dma_multiple()
2265 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2266 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2267 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2268 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in tb_test_credit_alloc_dma_multiple()
2282 path = tunnel3->paths[0]; in tb_test_credit_alloc_dma_multiple()
2283 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dma_multiple()
2284 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2285 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2286 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2287 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2289 path = tunnel3->paths[1]; in tb_test_credit_alloc_dma_multiple()
2290 KUNIT_ASSERT_EQ(test, path->path_length, 2); in tb_test_credit_alloc_dma_multiple()
2291 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2292 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2293 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in tb_test_credit_alloc_dma_multiple()
2294 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in tb_test_credit_alloc_dma_multiple()
2305 struct tb_path *path; in TB_TEST_PCIE_TUNNEL() local
2313 path = pcie_tunnel->paths[0]; in TB_TEST_PCIE_TUNNEL()
2314 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_PCIE_TUNNEL()
2315 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_PCIE_TUNNEL()
2316 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in TB_TEST_PCIE_TUNNEL()
2317 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_PCIE_TUNNEL()
2318 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 32U); in TB_TEST_PCIE_TUNNEL()
2320 path = pcie_tunnel->paths[1]; in TB_TEST_PCIE_TUNNEL()
2321 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_PCIE_TUNNEL()
2322 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_PCIE_TUNNEL()
2323 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in TB_TEST_PCIE_TUNNEL()
2324 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_PCIE_TUNNEL()
2325 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 64U); in TB_TEST_PCIE_TUNNEL()
2335 struct tb_path *path; in TB_TEST_DP_TUNNEL1() local
2343 path = dp_tunnel1->paths[0]; in TB_TEST_DP_TUNNEL1()
2344 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DP_TUNNEL1()
2345 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 12U); in TB_TEST_DP_TUNNEL1()
2346 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in TB_TEST_DP_TUNNEL1()
2347 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 18U); in TB_TEST_DP_TUNNEL1()
2348 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 0U); in TB_TEST_DP_TUNNEL1()
2350 path = dp_tunnel1->paths[1]; in TB_TEST_DP_TUNNEL1()
2351 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DP_TUNNEL1()
2352 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DP_TUNNEL1()
2353 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in TB_TEST_DP_TUNNEL1()
2354 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DP_TUNNEL1()
2355 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in TB_TEST_DP_TUNNEL1()
2357 path = dp_tunnel1->paths[2]; in TB_TEST_DP_TUNNEL1()
2358 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DP_TUNNEL1()
2359 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DP_TUNNEL1()
2360 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in TB_TEST_DP_TUNNEL1()
2361 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DP_TUNNEL1()
2362 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in TB_TEST_DP_TUNNEL1()
2372 struct tb_path *path; in TB_TEST_DP_TUNNEL2() local
2380 path = dp_tunnel2->paths[0]; in TB_TEST_DP_TUNNEL2()
2381 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DP_TUNNEL2()
2382 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 12U); in TB_TEST_DP_TUNNEL2()
2383 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in TB_TEST_DP_TUNNEL2()
2384 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 18U); in TB_TEST_DP_TUNNEL2()
2385 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 0U); in TB_TEST_DP_TUNNEL2()
2387 path = dp_tunnel2->paths[1]; in TB_TEST_DP_TUNNEL2()
2388 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DP_TUNNEL2()
2389 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DP_TUNNEL2()
2390 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in TB_TEST_DP_TUNNEL2()
2391 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DP_TUNNEL2()
2392 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in TB_TEST_DP_TUNNEL2()
2394 path = dp_tunnel2->paths[2]; in TB_TEST_DP_TUNNEL2()
2395 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DP_TUNNEL2()
2396 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DP_TUNNEL2()
2397 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 1U); in TB_TEST_DP_TUNNEL2()
2398 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DP_TUNNEL2()
2399 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in TB_TEST_DP_TUNNEL2()
2409 struct tb_path *path; in TB_TEST_USB3_TUNNEL() local
2417 path = usb3_tunnel->paths[0]; in TB_TEST_USB3_TUNNEL()
2418 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_USB3_TUNNEL()
2419 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_USB3_TUNNEL()
2420 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in TB_TEST_USB3_TUNNEL()
2421 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_USB3_TUNNEL()
2422 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in TB_TEST_USB3_TUNNEL()
2424 path = usb3_tunnel->paths[1]; in TB_TEST_USB3_TUNNEL()
2425 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_USB3_TUNNEL()
2426 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_USB3_TUNNEL()
2427 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 7U); in TB_TEST_USB3_TUNNEL()
2428 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_USB3_TUNNEL()
2429 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 32U); in TB_TEST_USB3_TUNNEL()
2439 struct tb_path *path; in TB_TEST_DMA_TUNNEL1() local
2447 path = dma_tunnel1->paths[0]; in TB_TEST_DMA_TUNNEL1()
2448 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DMA_TUNNEL1()
2449 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2450 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in TB_TEST_DMA_TUNNEL1()
2451 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2452 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in TB_TEST_DMA_TUNNEL1()
2454 path = dma_tunnel1->paths[1]; in TB_TEST_DMA_TUNNEL1()
2455 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DMA_TUNNEL1()
2456 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2457 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2458 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL1()
2459 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 14U); in TB_TEST_DMA_TUNNEL1()
2469 struct tb_path *path; in TB_TEST_DMA_TUNNEL2() local
2477 path = dma_tunnel2->paths[0]; in TB_TEST_DMA_TUNNEL2()
2478 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DMA_TUNNEL2()
2479 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2480 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 14U); in TB_TEST_DMA_TUNNEL2()
2481 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2482 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in TB_TEST_DMA_TUNNEL2()
2484 path = dma_tunnel2->paths[1]; in TB_TEST_DMA_TUNNEL2()
2485 KUNIT_ASSERT_EQ(test, path->path_length, 2); in TB_TEST_DMA_TUNNEL2()
2486 KUNIT_EXPECT_EQ(test, path->hops[0].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2487 KUNIT_EXPECT_EQ(test, path->hops[0].initial_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2488 KUNIT_EXPECT_EQ(test, path->hops[1].nfc_credits, 0U); in TB_TEST_DMA_TUNNEL2()
2489 KUNIT_EXPECT_EQ(test, path->hops[1].initial_credits, 1U); in TB_TEST_DMA_TUNNEL2()