• Home
  • Raw
  • Download

Lines Matching refs:path

116 static void tb_pci_init_path(struct tb_path *path)  in tb_pci_init_path()  argument
118 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_pci_init_path()
119 path->egress_shared_buffer = TB_PATH_NONE; in tb_pci_init_path()
120 path->ingress_fc_enable = TB_PATH_ALL; in tb_pci_init_path()
121 path->ingress_shared_buffer = TB_PATH_NONE; in tb_pci_init_path()
122 path->priority = 3; in tb_pci_init_path()
123 path->weight = 1; in tb_pci_init_path()
124 path->drop_packages = 0; in tb_pci_init_path()
125 path->nfc_credits = 0; in tb_pci_init_path()
126 path->hops[0].initial_credits = 7; in tb_pci_init_path()
127 if (path->path_length > 1) in tb_pci_init_path()
128 path->hops[1].initial_credits = in tb_pci_init_path()
129 tb_initial_credits(path->hops[1].in_port->sw); in tb_pci_init_path()
144 struct tb_path *path; in tb_tunnel_discover_pci() local
161 path = tb_path_discover(down, TB_PCI_HOPID, NULL, -1, in tb_tunnel_discover_pci()
163 if (!path) { in tb_tunnel_discover_pci()
168 tunnel->paths[TB_PCI_PATH_UP] = path; in tb_tunnel_discover_pci()
171 path = tb_path_discover(tunnel->dst_port, -1, down, TB_PCI_HOPID, NULL, in tb_tunnel_discover_pci()
173 if (!path) in tb_tunnel_discover_pci()
175 tunnel->paths[TB_PCI_PATH_DOWN] = path; in tb_tunnel_discover_pci()
222 struct tb_path *path; in tb_tunnel_alloc_pci() local
232 path = tb_path_alloc(tb, down, TB_PCI_HOPID, up, TB_PCI_HOPID, 0, in tb_tunnel_alloc_pci()
234 if (!path) { in tb_tunnel_alloc_pci()
238 tb_pci_init_path(path); in tb_tunnel_alloc_pci()
239 tunnel->paths[TB_PCI_PATH_DOWN] = path; in tb_tunnel_alloc_pci()
241 path = tb_path_alloc(tb, up, TB_PCI_HOPID, down, TB_PCI_HOPID, 0, in tb_tunnel_alloc_pci()
243 if (!path) { in tb_tunnel_alloc_pci()
247 tb_pci_init_path(path); in tb_tunnel_alloc_pci()
248 tunnel->paths[TB_PCI_PATH_UP] = path; in tb_tunnel_alloc_pci()
605 static void tb_dp_init_aux_path(struct tb_path *path) in tb_dp_init_aux_path() argument
609 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_dp_init_aux_path()
610 path->egress_shared_buffer = TB_PATH_NONE; in tb_dp_init_aux_path()
611 path->ingress_fc_enable = TB_PATH_ALL; in tb_dp_init_aux_path()
612 path->ingress_shared_buffer = TB_PATH_NONE; in tb_dp_init_aux_path()
613 path->priority = 2; in tb_dp_init_aux_path()
614 path->weight = 1; in tb_dp_init_aux_path()
616 for (i = 0; i < path->path_length; i++) in tb_dp_init_aux_path()
617 path->hops[i].initial_credits = 1; in tb_dp_init_aux_path()
620 static void tb_dp_init_video_path(struct tb_path *path, bool discover) in tb_dp_init_video_path() argument
622 u32 nfc_credits = path->hops[0].in_port->config.nfc_credits; in tb_dp_init_video_path()
624 path->egress_fc_enable = TB_PATH_NONE; in tb_dp_init_video_path()
625 path->egress_shared_buffer = TB_PATH_NONE; in tb_dp_init_video_path()
626 path->ingress_fc_enable = TB_PATH_NONE; in tb_dp_init_video_path()
627 path->ingress_shared_buffer = TB_PATH_NONE; in tb_dp_init_video_path()
628 path->priority = 1; in tb_dp_init_video_path()
629 path->weight = 1; in tb_dp_init_video_path()
632 path->nfc_credits = nfc_credits & ADP_CS_4_NFC_BUFFERS_MASK; in tb_dp_init_video_path()
639 path->nfc_credits = min(max_credits - 2, 12U); in tb_dp_init_video_path()
658 struct tb_path *path; in tb_tunnel_discover_dp() local
672 path = tb_path_discover(in, TB_DP_VIDEO_HOPID, NULL, -1, in tb_tunnel_discover_dp()
674 if (!path) { in tb_tunnel_discover_dp()
679 tunnel->paths[TB_DP_VIDEO_PATH_OUT] = path; in tb_tunnel_discover_dp()
682 path = tb_path_discover(in, TB_DP_AUX_TX_HOPID, NULL, -1, NULL, "AUX TX"); in tb_tunnel_discover_dp()
683 if (!path) in tb_tunnel_discover_dp()
685 tunnel->paths[TB_DP_AUX_PATH_OUT] = path; in tb_tunnel_discover_dp()
688 path = tb_path_discover(tunnel->dst_port, -1, in, TB_DP_AUX_RX_HOPID, in tb_tunnel_discover_dp()
690 if (!path) in tb_tunnel_discover_dp()
692 tunnel->paths[TB_DP_AUX_PATH_IN] = path; in tb_tunnel_discover_dp()
744 struct tb_path *path; in tb_tunnel_alloc_dp() local
763 path = tb_path_alloc(tb, in, TB_DP_VIDEO_HOPID, out, TB_DP_VIDEO_HOPID, in tb_tunnel_alloc_dp()
765 if (!path) in tb_tunnel_alloc_dp()
767 tb_dp_init_video_path(path, false); in tb_tunnel_alloc_dp()
768 paths[TB_DP_VIDEO_PATH_OUT] = path; in tb_tunnel_alloc_dp()
770 path = tb_path_alloc(tb, in, TB_DP_AUX_TX_HOPID, out, in tb_tunnel_alloc_dp()
772 if (!path) in tb_tunnel_alloc_dp()
774 tb_dp_init_aux_path(path); in tb_tunnel_alloc_dp()
775 paths[TB_DP_AUX_PATH_OUT] = path; in tb_tunnel_alloc_dp()
777 path = tb_path_alloc(tb, out, TB_DP_AUX_RX_HOPID, in, in tb_tunnel_alloc_dp()
779 if (!path) in tb_tunnel_alloc_dp()
781 tb_dp_init_aux_path(path); in tb_tunnel_alloc_dp()
782 paths[TB_DP_AUX_PATH_IN] = path; in tb_tunnel_alloc_dp()
809 static void tb_dma_init_path(struct tb_path *path, unsigned int isb, in tb_dma_init_path() argument
814 path->egress_fc_enable = efc; in tb_dma_init_path()
815 path->ingress_fc_enable = TB_PATH_ALL; in tb_dma_init_path()
816 path->egress_shared_buffer = TB_PATH_NONE; in tb_dma_init_path()
817 path->ingress_shared_buffer = isb; in tb_dma_init_path()
818 path->priority = 5; in tb_dma_init_path()
819 path->weight = 1; in tb_dma_init_path()
820 path->clear_fc = true; in tb_dma_init_path()
822 for (i = 0; i < path->path_length; i++) in tb_dma_init_path()
823 path->hops[i].initial_credits = credits; in tb_dma_init_path()
846 struct tb_path *path; in tb_tunnel_alloc_dma() local
859 path = tb_path_alloc(tb, dst, receive_path, nhi, receive_ring, 0, "DMA RX"); in tb_tunnel_alloc_dma()
860 if (!path) { in tb_tunnel_alloc_dma()
864 tb_dma_init_path(path, TB_PATH_NONE, TB_PATH_SOURCE | TB_PATH_INTERNAL, in tb_tunnel_alloc_dma()
866 tunnel->paths[TB_DMA_PATH_IN] = path; in tb_tunnel_alloc_dma()
868 path = tb_path_alloc(tb, nhi, transmit_ring, dst, transmit_path, 0, "DMA TX"); in tb_tunnel_alloc_dma()
869 if (!path) { in tb_tunnel_alloc_dma()
873 tb_dma_init_path(path, TB_PATH_SOURCE, TB_PATH_ALL, credits); in tb_tunnel_alloc_dma()
874 tunnel->paths[TB_DMA_PATH_OUT] = path; in tb_tunnel_alloc_dma()
1008 static void tb_usb3_init_path(struct tb_path *path) in tb_usb3_init_path() argument
1010 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_usb3_init_path()
1011 path->egress_shared_buffer = TB_PATH_NONE; in tb_usb3_init_path()
1012 path->ingress_fc_enable = TB_PATH_ALL; in tb_usb3_init_path()
1013 path->ingress_shared_buffer = TB_PATH_NONE; in tb_usb3_init_path()
1014 path->priority = 3; in tb_usb3_init_path()
1015 path->weight = 3; in tb_usb3_init_path()
1016 path->drop_packages = 0; in tb_usb3_init_path()
1017 path->nfc_credits = 0; in tb_usb3_init_path()
1018 path->hops[0].initial_credits = 7; in tb_usb3_init_path()
1019 if (path->path_length > 1) in tb_usb3_init_path()
1020 path->hops[1].initial_credits = in tb_usb3_init_path()
1021 tb_initial_credits(path->hops[1].in_port->sw); in tb_usb3_init_path()
1036 struct tb_path *path; in tb_tunnel_discover_usb3() local
1053 path = tb_path_discover(down, TB_USB3_HOPID, NULL, -1, in tb_tunnel_discover_usb3()
1055 if (!path) { in tb_tunnel_discover_usb3()
1060 tunnel->paths[TB_USB3_PATH_DOWN] = path; in tb_tunnel_discover_usb3()
1063 path = tb_path_discover(tunnel->dst_port, -1, down, TB_USB3_HOPID, NULL, in tb_tunnel_discover_usb3()
1065 if (!path) in tb_tunnel_discover_usb3()
1067 tunnel->paths[TB_USB3_PATH_UP] = path; in tb_tunnel_discover_usb3()
1142 struct tb_path *path; in tb_tunnel_alloc_usb3() local
1175 path = tb_path_alloc(tb, down, TB_USB3_HOPID, up, TB_USB3_HOPID, 0, in tb_tunnel_alloc_usb3()
1177 if (!path) { in tb_tunnel_alloc_usb3()
1181 tb_usb3_init_path(path); in tb_tunnel_alloc_usb3()
1182 tunnel->paths[TB_USB3_PATH_DOWN] = path; in tb_tunnel_alloc_usb3()
1184 path = tb_path_alloc(tb, up, TB_USB3_HOPID, down, TB_USB3_HOPID, 0, in tb_tunnel_alloc_usb3()
1186 if (!path) { in tb_tunnel_alloc_usb3()
1190 tb_usb3_init_path(path); in tb_tunnel_alloc_usb3()
1191 tunnel->paths[TB_USB3_PATH_UP] = path; in tb_tunnel_alloc_usb3()