Lines Matching +full:0 +full:xd

19 #define DMA_TEST_DATA_PATTERN		0x0123456789abcdefLL
72 * @xd: XDomain the service belongs to
81 * @link_speed: Expected link speed (Gb/s), %0 to use whatever is negotiated
82 * @link_width: Expected link width (Gb/s), %0 to use whatever is negotiated
94 struct tb_xdomain *xd; member
116 UUID_INIT(0x3188cd10, 0x6523, 0x4a5a,
117 0xa6, 0x82, 0xfd, 0xca, 0x07, 0xa2, 0x48, 0xd8);
125 tb_xdomain_release_in_hopid(dt->xd, dt->rx_hopid); in dma_test_free_rings()
130 tb_xdomain_release_out_hopid(dt->xd, dt->tx_hopid); in dma_test_free_rings()
139 struct tb_xdomain *xd = dt->xd; in dma_test_start_rings() local
140 int ret, e2e_tx_hop = 0; in dma_test_start_rings()
152 ring = tb_ring_alloc_tx(xd->tb->nhi, -1, DMA_TEST_TX_RING_SIZE, in dma_test_start_rings()
160 ret = tb_xdomain_alloc_out_hopid(xd, -1); in dma_test_start_rings()
161 if (ret < 0) { in dma_test_start_rings()
175 ring = tb_ring_alloc_rx(xd->tb->nhi, -1, DMA_TEST_RX_RING_SIZE, in dma_test_start_rings()
185 ret = tb_xdomain_alloc_in_hopid(xd, -1); in dma_test_start_rings()
186 if (ret < 0) { in dma_test_start_rings()
194 ret = tb_xdomain_enable_paths(dt->xd, dt->tx_hopid, in dma_test_start_rings()
195 dt->tx_ring ? dt->tx_ring->hop : 0, in dma_test_start_rings()
197 dt->rx_ring ? dt->rx_ring->hop : 0); in dma_test_start_rings()
208 return 0; in dma_test_start_rings()
220 ret = tb_xdomain_disable_paths(dt->xd, dt->tx_hopid, in dma_test_stop_rings()
221 dt->tx_ring ? dt->tx_ring->hop : 0, in dma_test_stop_rings()
223 dt->rx_ring ? dt->rx_ring->hop : 0); in dma_test_stop_rings()
266 for (i = 0; i < npackets; i++) { in dma_test_submit_rx()
296 return 0; in dma_test_submit_rx()
317 for (i = 0; i < npackets; i++) { in dma_test_submit_tx()
325 tf->frame.size = 0; /* means 4096 */ in dma_test_submit_tx()
355 return 0; in dma_test_submit_tx()
370 return 0; \
386 return 0; \
398 return val > 2 ? -EINVAL : 0; in lanes_validate()
417 case 0: in speed_validate()
418 return 0; in speed_validate()
437 return val > DMA_TEST_MAX_PACKETS ? -EINVAL : 0; in packets_to_receive_validate()
454 return val > DMA_TEST_MAX_PACKETS ? -EINVAL : 0; in packets_to_send_validate()
468 return tb_xdomain_lane_bonding_enable(dt->xd); in dma_test_set_bonding()
470 tb_xdomain_lane_bonding_disable(dt->xd); in dma_test_set_bonding()
473 return 0; in dma_test_set_bonding()
490 if (dt->link_speed && dt->xd->link_speed != dt->link_speed) { in dma_test_check_errors()
493 dt->xd->link_width != dt->link_width) { in dma_test_check_errors()
520 dt->packets_sent = 0; in test_store()
521 dt->packets_received = 0; in test_store()
522 dt->crc_errors = 0; in test_store()
523 dt->buffer_overflow_errors = 0; in test_store()
616 return 0; in status_show()
638 struct tb_xdomain *xd = tb_service_parent(svc); in dma_test_probe() local
646 dt->xd = xd; in dma_test_probe()
653 return 0; in dma_test_probe()
675 return 0; in dma_test_suspend()
680 return 0; in dma_test_resume()
713 for (i = 0; i < DMA_TEST_FRAME_SIZE / sizeof(data_value); i++) in dma_test_init()
724 tb_property_add_immediate(dma_test_dir, "prtcrevs", 0); in dma_test_init()
725 tb_property_add_immediate(dma_test_dir, "prtcstns", 0); in dma_test_init()
735 return 0; in dma_test_init()