Lines Matching refs:path
93 static void tb_pci_init_path(struct tb_path *path) in tb_pci_init_path() argument
95 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_pci_init_path()
96 path->egress_shared_buffer = TB_PATH_NONE; in tb_pci_init_path()
97 path->ingress_fc_enable = TB_PATH_ALL; in tb_pci_init_path()
98 path->ingress_shared_buffer = TB_PATH_NONE; in tb_pci_init_path()
99 path->priority = 3; in tb_pci_init_path()
100 path->weight = 1; in tb_pci_init_path()
101 path->drop_packages = 0; in tb_pci_init_path()
102 path->nfc_credits = 0; in tb_pci_init_path()
103 path->hops[0].initial_credits = 7; in tb_pci_init_path()
104 path->hops[1].initial_credits = 16; in tb_pci_init_path()
119 struct tb_path *path; in tb_tunnel_discover_pci() local
136 path = tb_path_discover(down, TB_PCI_HOPID, NULL, -1, in tb_tunnel_discover_pci()
138 if (!path) { in tb_tunnel_discover_pci()
143 tunnel->paths[TB_PCI_PATH_UP] = path; in tb_tunnel_discover_pci()
146 path = tb_path_discover(tunnel->dst_port, -1, down, TB_PCI_HOPID, NULL, in tb_tunnel_discover_pci()
148 if (!path) in tb_tunnel_discover_pci()
150 tunnel->paths[TB_PCI_PATH_DOWN] = path; in tb_tunnel_discover_pci()
197 struct tb_path *path; in tb_tunnel_alloc_pci() local
207 path = tb_path_alloc(tb, down, TB_PCI_HOPID, up, TB_PCI_HOPID, 0, in tb_tunnel_alloc_pci()
209 if (!path) { in tb_tunnel_alloc_pci()
213 tb_pci_init_path(path); in tb_tunnel_alloc_pci()
214 tunnel->paths[TB_PCI_PATH_DOWN] = path; in tb_tunnel_alloc_pci()
216 path = tb_path_alloc(tb, up, TB_PCI_HOPID, down, TB_PCI_HOPID, 0, in tb_tunnel_alloc_pci()
218 if (!path) { in tb_tunnel_alloc_pci()
222 tb_pci_init_path(path); in tb_tunnel_alloc_pci()
223 tunnel->paths[TB_PCI_PATH_UP] = path; in tb_tunnel_alloc_pci()
300 static void tb_dp_init_aux_path(struct tb_path *path) in tb_dp_init_aux_path() argument
304 path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL; in tb_dp_init_aux_path()
305 path->egress_shared_buffer = TB_PATH_NONE; in tb_dp_init_aux_path()
306 path->ingress_fc_enable = TB_PATH_ALL; in tb_dp_init_aux_path()
307 path->ingress_shared_buffer = TB_PATH_NONE; in tb_dp_init_aux_path()
308 path->priority = 2; in tb_dp_init_aux_path()
309 path->weight = 1; in tb_dp_init_aux_path()
311 for (i = 0; i < path->path_length; i++) in tb_dp_init_aux_path()
312 path->hops[i].initial_credits = 1; in tb_dp_init_aux_path()
315 static void tb_dp_init_video_path(struct tb_path *path, bool discover) in tb_dp_init_video_path() argument
317 u32 nfc_credits = path->hops[0].in_port->config.nfc_credits; in tb_dp_init_video_path()
319 path->egress_fc_enable = TB_PATH_NONE; in tb_dp_init_video_path()
320 path->egress_shared_buffer = TB_PATH_NONE; in tb_dp_init_video_path()
321 path->ingress_fc_enable = TB_PATH_NONE; in tb_dp_init_video_path()
322 path->ingress_shared_buffer = TB_PATH_NONE; in tb_dp_init_video_path()
323 path->priority = 1; in tb_dp_init_video_path()
324 path->weight = 1; in tb_dp_init_video_path()
327 path->nfc_credits = nfc_credits & TB_PORT_NFC_CREDITS_MASK; in tb_dp_init_video_path()
334 path->nfc_credits = min(max_credits - 2, 12U); in tb_dp_init_video_path()
353 struct tb_path *path; in tb_tunnel_discover_dp() local
366 path = tb_path_discover(in, TB_DP_VIDEO_HOPID, NULL, -1, in tb_tunnel_discover_dp()
368 if (!path) { in tb_tunnel_discover_dp()
373 tunnel->paths[TB_DP_VIDEO_PATH_OUT] = path; in tb_tunnel_discover_dp()
376 path = tb_path_discover(in, TB_DP_AUX_TX_HOPID, NULL, -1, NULL, "AUX TX"); in tb_tunnel_discover_dp()
377 if (!path) in tb_tunnel_discover_dp()
379 tunnel->paths[TB_DP_AUX_PATH_OUT] = path; in tb_tunnel_discover_dp()
382 path = tb_path_discover(tunnel->dst_port, -1, in, TB_DP_AUX_RX_HOPID, in tb_tunnel_discover_dp()
384 if (!path) in tb_tunnel_discover_dp()
386 tunnel->paths[TB_DP_AUX_PATH_IN] = path; in tb_tunnel_discover_dp()
433 struct tb_path *path; in tb_tunnel_alloc_dp() local
449 path = tb_path_alloc(tb, in, TB_DP_VIDEO_HOPID, out, TB_DP_VIDEO_HOPID, in tb_tunnel_alloc_dp()
451 if (!path) in tb_tunnel_alloc_dp()
453 tb_dp_init_video_path(path, false); in tb_tunnel_alloc_dp()
454 paths[TB_DP_VIDEO_PATH_OUT] = path; in tb_tunnel_alloc_dp()
456 path = tb_path_alloc(tb, in, TB_DP_AUX_TX_HOPID, out, in tb_tunnel_alloc_dp()
458 if (!path) in tb_tunnel_alloc_dp()
460 tb_dp_init_aux_path(path); in tb_tunnel_alloc_dp()
461 paths[TB_DP_AUX_PATH_OUT] = path; in tb_tunnel_alloc_dp()
463 path = tb_path_alloc(tb, out, TB_DP_AUX_RX_HOPID, in, in tb_tunnel_alloc_dp()
465 if (!path) in tb_tunnel_alloc_dp()
467 tb_dp_init_aux_path(path); in tb_tunnel_alloc_dp()
468 paths[TB_DP_AUX_PATH_IN] = path; in tb_tunnel_alloc_dp()
495 static void tb_dma_init_path(struct tb_path *path, unsigned int isb, in tb_dma_init_path() argument
500 path->egress_fc_enable = efc; in tb_dma_init_path()
501 path->ingress_fc_enable = TB_PATH_ALL; in tb_dma_init_path()
502 path->egress_shared_buffer = TB_PATH_NONE; in tb_dma_init_path()
503 path->ingress_shared_buffer = isb; in tb_dma_init_path()
504 path->priority = 5; in tb_dma_init_path()
505 path->weight = 1; in tb_dma_init_path()
506 path->clear_fc = true; in tb_dma_init_path()
508 for (i = 0; i < path->path_length; i++) in tb_dma_init_path()
509 path->hops[i].initial_credits = credits; in tb_dma_init_path()
532 struct tb_path *path; in tb_tunnel_alloc_dma() local
545 path = tb_path_alloc(tb, dst, receive_path, nhi, receive_ring, 0, "DMA RX"); in tb_tunnel_alloc_dma()
546 if (!path) { in tb_tunnel_alloc_dma()
550 tb_dma_init_path(path, TB_PATH_NONE, TB_PATH_SOURCE | TB_PATH_INTERNAL, in tb_tunnel_alloc_dma()
552 tunnel->paths[TB_DMA_PATH_IN] = path; in tb_tunnel_alloc_dma()
554 path = tb_path_alloc(tb, nhi, transmit_ring, dst, transmit_path, 0, "DMA TX"); in tb_tunnel_alloc_dma()
555 if (!path) { in tb_tunnel_alloc_dma()
559 tb_dma_init_path(path, TB_PATH_SOURCE, TB_PATH_ALL, credits); in tb_tunnel_alloc_dma()
560 tunnel->paths[TB_DMA_PATH_OUT] = path; in tb_tunnel_alloc_dma()