Lines Matching refs:path
388 static int tb_pci_init_path(struct tb_path *path) in tb_pci_init_path() argument
392 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_pci_init_path()
393 path->egress_shared_buffer = TB_PATH_NONE; in tb_pci_init_path()
394 path->ingress_fc_enable = TB_PATH_ALL; in tb_pci_init_path()
395 path->ingress_shared_buffer = TB_PATH_NONE; in tb_pci_init_path()
396 path->priority = TB_PCI_PRIORITY; in tb_pci_init_path()
397 path->weight = TB_PCI_WEIGHT; in tb_pci_init_path()
398 path->drop_packages = 0; in tb_pci_init_path()
400 tb_path_for_each_hop(path, hop) { in tb_pci_init_path()
425 struct tb_path *path; in tb_tunnel_discover_pci() local
442 path = tb_path_discover(down, TB_PCI_HOPID, NULL, -1, in tb_tunnel_discover_pci()
444 if (!path) { in tb_tunnel_discover_pci()
449 tunnel->paths[TB_PCI_PATH_UP] = path; in tb_tunnel_discover_pci()
453 path = tb_path_discover(tunnel->dst_port, -1, down, TB_PCI_HOPID, NULL, in tb_tunnel_discover_pci()
455 if (!path) in tb_tunnel_discover_pci()
457 tunnel->paths[TB_PCI_PATH_DOWN] = path; in tb_tunnel_discover_pci()
505 struct tb_path *path; in tb_tunnel_alloc_pci() local
515 path = tb_path_alloc(tb, down, TB_PCI_HOPID, up, TB_PCI_HOPID, 0, in tb_tunnel_alloc_pci()
517 if (!path) in tb_tunnel_alloc_pci()
519 tunnel->paths[TB_PCI_PATH_DOWN] = path; in tb_tunnel_alloc_pci()
520 if (tb_pci_init_path(path)) in tb_tunnel_alloc_pci()
523 path = tb_path_alloc(tb, up, TB_PCI_HOPID, down, TB_PCI_HOPID, 0, in tb_tunnel_alloc_pci()
525 if (!path) in tb_tunnel_alloc_pci()
527 tunnel->paths[TB_PCI_PATH_UP] = path; in tb_tunnel_alloc_pci()
528 if (tb_pci_init_path(path)) in tb_tunnel_alloc_pci()
1428 static void tb_dp_init_aux_path(struct tb_path *path, bool pm_support) in tb_dp_init_aux_path() argument
1432 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_dp_init_aux_path()
1433 path->egress_shared_buffer = TB_PATH_NONE; in tb_dp_init_aux_path()
1434 path->ingress_fc_enable = TB_PATH_ALL; in tb_dp_init_aux_path()
1435 path->ingress_shared_buffer = TB_PATH_NONE; in tb_dp_init_aux_path()
1436 path->priority = TB_DP_AUX_PRIORITY; in tb_dp_init_aux_path()
1437 path->weight = TB_DP_AUX_WEIGHT; in tb_dp_init_aux_path()
1439 tb_path_for_each_hop(path, hop) { in tb_dp_init_aux_path()
1475 static int tb_dp_init_video_path(struct tb_path *path, bool pm_support) in tb_dp_init_video_path() argument
1479 path->egress_fc_enable = TB_PATH_NONE; in tb_dp_init_video_path()
1480 path->egress_shared_buffer = TB_PATH_NONE; in tb_dp_init_video_path()
1481 path->ingress_fc_enable = TB_PATH_NONE; in tb_dp_init_video_path()
1482 path->ingress_shared_buffer = TB_PATH_NONE; in tb_dp_init_video_path()
1483 path->priority = TB_DP_VIDEO_PRIORITY; in tb_dp_init_video_path()
1484 path->weight = TB_DP_VIDEO_WEIGHT; in tb_dp_init_video_path()
1486 tb_path_for_each_hop(path, hop) { in tb_dp_init_video_path()
1557 struct tb_path *path; in tb_tunnel_discover_dp() local
1575 path = tb_path_discover(in, TB_DP_VIDEO_HOPID, NULL, -1, in tb_tunnel_discover_dp()
1577 if (!path) { in tb_tunnel_discover_dp()
1582 tunnel->paths[TB_DP_VIDEO_PATH_OUT] = path; in tb_tunnel_discover_dp()
1586 path = tb_path_discover(in, TB_DP_AUX_TX_HOPID, NULL, -1, NULL, "AUX TX", in tb_tunnel_discover_dp()
1588 if (!path) in tb_tunnel_discover_dp()
1590 tunnel->paths[TB_DP_AUX_PATH_OUT] = path; in tb_tunnel_discover_dp()
1593 path = tb_path_discover(tunnel->dst_port, -1, in, TB_DP_AUX_RX_HOPID, in tb_tunnel_discover_dp()
1595 if (!path) in tb_tunnel_discover_dp()
1597 tunnel->paths[TB_DP_AUX_PATH_IN] = path; in tb_tunnel_discover_dp()
1661 struct tb_path *path; in tb_tunnel_alloc_dp() local
1689 path = tb_path_alloc(tb, in, TB_DP_VIDEO_HOPID, out, TB_DP_VIDEO_HOPID, in tb_tunnel_alloc_dp()
1691 if (!path) in tb_tunnel_alloc_dp()
1693 tb_dp_init_video_path(path, pm_support); in tb_tunnel_alloc_dp()
1694 paths[TB_DP_VIDEO_PATH_OUT] = path; in tb_tunnel_alloc_dp()
1696 path = tb_path_alloc(tb, in, TB_DP_AUX_TX_HOPID, out, in tb_tunnel_alloc_dp()
1698 if (!path) in tb_tunnel_alloc_dp()
1700 tb_dp_init_aux_path(path, pm_support); in tb_tunnel_alloc_dp()
1701 paths[TB_DP_AUX_PATH_OUT] = path; in tb_tunnel_alloc_dp()
1703 path = tb_path_alloc(tb, out, TB_DP_AUX_RX_HOPID, in, in tb_tunnel_alloc_dp()
1705 if (!path) in tb_tunnel_alloc_dp()
1707 tb_dp_init_aux_path(path, pm_support); in tb_tunnel_alloc_dp()
1708 paths[TB_DP_AUX_PATH_IN] = path; in tb_tunnel_alloc_dp()
1763 static int tb_dma_init_rx_path(struct tb_path *path, unsigned int credits) in tb_dma_init_rx_path() argument
1768 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_dma_init_rx_path()
1769 path->ingress_fc_enable = TB_PATH_ALL; in tb_dma_init_rx_path()
1770 path->egress_shared_buffer = TB_PATH_NONE; in tb_dma_init_rx_path()
1771 path->ingress_shared_buffer = TB_PATH_NONE; in tb_dma_init_rx_path()
1772 path->priority = TB_DMA_PRIORITY; in tb_dma_init_rx_path()
1773 path->weight = TB_DMA_WEIGHT; in tb_dma_init_rx_path()
1774 path->clear_fc = true; in tb_dma_init_rx_path()
1781 hop = &path->hops[0]; in tb_dma_init_rx_path()
1786 for (i = 1; i < path->path_length; i++) { in tb_dma_init_rx_path()
1789 ret = tb_dma_reserve_credits(&path->hops[i], credits); in tb_dma_init_rx_path()
1798 static int tb_dma_init_tx_path(struct tb_path *path, unsigned int credits) in tb_dma_init_tx_path() argument
1802 path->egress_fc_enable = TB_PATH_ALL; in tb_dma_init_tx_path()
1803 path->ingress_fc_enable = TB_PATH_ALL; in tb_dma_init_tx_path()
1804 path->egress_shared_buffer = TB_PATH_NONE; in tb_dma_init_tx_path()
1805 path->ingress_shared_buffer = TB_PATH_NONE; in tb_dma_init_tx_path()
1806 path->priority = TB_DMA_PRIORITY; in tb_dma_init_tx_path()
1807 path->weight = TB_DMA_WEIGHT; in tb_dma_init_tx_path()
1808 path->clear_fc = true; in tb_dma_init_tx_path()
1810 tb_path_for_each_hop(path, hop) { in tb_dma_init_tx_path()
1833 static void tb_dma_destroy_path(struct tb_path *path) in tb_dma_destroy_path() argument
1837 tb_path_for_each_hop(path, hop) in tb_dma_destroy_path()
1873 struct tb_path *path; in tb_tunnel_alloc_dma() local
1899 path = tb_path_alloc(tb, dst, receive_path, nhi, receive_ring, 0, in tb_tunnel_alloc_dma()
1901 if (!path) in tb_tunnel_alloc_dma()
1903 tunnel->paths[i++] = path; in tb_tunnel_alloc_dma()
1904 if (tb_dma_init_rx_path(path, credits)) { in tb_tunnel_alloc_dma()
1911 path = tb_path_alloc(tb, nhi, transmit_ring, dst, transmit_path, 0, in tb_tunnel_alloc_dma()
1913 if (!path) in tb_tunnel_alloc_dma()
1915 tunnel->paths[i++] = path; in tb_tunnel_alloc_dma()
1916 if (tb_dma_init_tx_path(path, credits)) { in tb_tunnel_alloc_dma()
1953 const struct tb_path *path = tunnel->paths[i]; in tb_tunnel_match_dma() local
1955 if (!path) in tb_tunnel_match_dma()
1958 if (tb_port_is_nhi(path->hops[0].in_port)) in tb_tunnel_match_dma()
1959 tx_path = path; in tb_tunnel_match_dma()
1960 else if (tb_port_is_nhi(path->hops[path->path_length - 1].out_port)) in tb_tunnel_match_dma()
1961 rx_path = path; in tb_tunnel_match_dma()
2140 static void tb_usb3_init_path(struct tb_path *path) in tb_usb3_init_path() argument
2144 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_usb3_init_path()
2145 path->egress_shared_buffer = TB_PATH_NONE; in tb_usb3_init_path()
2146 path->ingress_fc_enable = TB_PATH_ALL; in tb_usb3_init_path()
2147 path->ingress_shared_buffer = TB_PATH_NONE; in tb_usb3_init_path()
2148 path->priority = TB_USB3_PRIORITY; in tb_usb3_init_path()
2149 path->weight = TB_USB3_WEIGHT; in tb_usb3_init_path()
2150 path->drop_packages = 0; in tb_usb3_init_path()
2152 tb_path_for_each_hop(path, hop) in tb_usb3_init_path()
2170 struct tb_path *path; in tb_tunnel_discover_usb3() local
2187 path = tb_path_discover(down, TB_USB3_HOPID, NULL, -1, in tb_tunnel_discover_usb3()
2189 if (!path) { in tb_tunnel_discover_usb3()
2194 tunnel->paths[TB_USB3_PATH_DOWN] = path; in tb_tunnel_discover_usb3()
2197 path = tb_path_discover(tunnel->dst_port, -1, down, TB_USB3_HOPID, NULL, in tb_tunnel_discover_usb3()
2199 if (!path) in tb_tunnel_discover_usb3()
2201 tunnel->paths[TB_USB3_PATH_UP] = path; in tb_tunnel_discover_usb3()
2276 struct tb_path *path; in tb_tunnel_alloc_usb3() local
2304 path = tb_path_alloc(tb, down, TB_USB3_HOPID, up, TB_USB3_HOPID, 0, in tb_tunnel_alloc_usb3()
2306 if (!path) in tb_tunnel_alloc_usb3()
2308 tb_usb3_init_path(path); in tb_tunnel_alloc_usb3()
2309 tunnel->paths[TB_USB3_PATH_DOWN] = path; in tb_tunnel_alloc_usb3()
2311 path = tb_path_alloc(tb, up, TB_USB3_HOPID, down, TB_USB3_HOPID, 0, in tb_tunnel_alloc_usb3()
2313 if (!path) in tb_tunnel_alloc_usb3()
2315 tb_usb3_init_path(path); in tb_tunnel_alloc_usb3()
2316 tunnel->paths[TB_USB3_PATH_UP] = path; in tb_tunnel_alloc_usb3()