Lines Matching refs:svc

93 	const struct tb_service *svc;  member
225 dev_warn(&dt->svc->dev, "failed to disable DMA paths\n"); in dma_test_stop_rings()
247 dev_dbg(&dt->svc->dev, "packet %u/%u received\n", dt->packets_received, in dma_test_rx_callback()
349 dev_dbg(&dt->svc->dev, "packet %u/%u sent\n", dt->packets_sent, in dma_test_submit_tx()
361 struct tb_service *svc = data; \
362 struct dma_test *dt = tb_service_get_drvdata(svc); \
374 struct tb_service *svc = data; \
375 struct dma_test *dt = tb_service_get_drvdata(svc); \
509 struct tb_service *svc = data; in test_store() local
510 struct dma_test *dt = tb_service_get_drvdata(svc); in test_store()
527 dev_dbg(&svc->dev, "DMA test starting\n"); in test_store()
529 dev_dbg(&svc->dev, "link_speed: %u Gb/s\n", dt->link_speed); in test_store()
531 dev_dbg(&svc->dev, "link_width: %u\n", dt->link_width); in test_store()
532 dev_dbg(&svc->dev, "packets_to_send: %u\n", dt->packets_to_send); in test_store()
533 dev_dbg(&svc->dev, "packets_to_receive: %u\n", dt->packets_to_receive); in test_store()
536 dev_err(&svc->dev, "invalid test configuration\n"); in test_store()
543 dev_err(&svc->dev, "failed to set lanes\n"); in test_store()
550 dev_err(&svc->dev, "failed to enable DMA rings\n"); in test_store()
559 dev_err(&svc->dev, "failed to submit receive buffers\n"); in test_store()
568 dev_err(&svc->dev, "failed to submit transmit buffers\n"); in test_store()
588 dev_dbg(&svc->dev, "DMA test %s\n", dma_test_result_names[dt->result]); in test_store()
595 struct tb_service *svc = s->private; in status_show() local
596 struct dma_test *dt = tb_service_get_drvdata(svc); in status_show()
620 static void dma_test_debugfs_init(struct tb_service *svc) in dma_test_debugfs_init() argument
622 struct dma_test *dt = tb_service_get_drvdata(svc); in dma_test_debugfs_init()
624 dt->debugfs_dir = debugfs_create_dir("dma_test", svc->debugfs_dir); in dma_test_debugfs_init()
626 debugfs_create_file("lanes", 0600, dt->debugfs_dir, svc, &lanes_fops); in dma_test_debugfs_init()
627 debugfs_create_file("speed", 0600, dt->debugfs_dir, svc, &speed_fops); in dma_test_debugfs_init()
628 debugfs_create_file("packets_to_receive", 0600, dt->debugfs_dir, svc, in dma_test_debugfs_init()
630 debugfs_create_file("packets_to_send", 0600, dt->debugfs_dir, svc, in dma_test_debugfs_init()
632 debugfs_create_file("status", 0400, dt->debugfs_dir, svc, &status_fops); in dma_test_debugfs_init()
633 debugfs_create_file("test", 0200, dt->debugfs_dir, svc, &test_fops); in dma_test_debugfs_init()
636 static int dma_test_probe(struct tb_service *svc, const struct tb_service_id *id) in dma_test_probe() argument
638 struct tb_xdomain *xd = tb_service_parent(svc); in dma_test_probe()
641 dt = devm_kzalloc(&svc->dev, sizeof(*dt), GFP_KERNEL); in dma_test_probe()
645 dt->svc = svc; in dma_test_probe()
650 tb_service_set_drvdata(svc, dt); in dma_test_probe()
651 dma_test_debugfs_init(svc); in dma_test_probe()
656 static void dma_test_remove(struct tb_service *svc) in dma_test_remove() argument
658 struct dma_test *dt = tb_service_get_drvdata(svc); in dma_test_remove()