Lines Matching refs:card

67 int fw_iso_buffer_map_dma(struct fw_iso_buffer *buffer, struct fw_card *card,  in fw_iso_buffer_map_dma()  argument
76 address = dma_map_page(card->device, buffer->pages[i], in fw_iso_buffer_map_dma()
78 if (dma_mapping_error(card->device, address)) in fw_iso_buffer_map_dma()
90 int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, in fw_iso_buffer_init() argument
99 ret = fw_iso_buffer_map_dma(buffer, card, direction); in fw_iso_buffer_init()
101 fw_iso_buffer_destroy(buffer, card); in fw_iso_buffer_init()
126 struct fw_card *card) in fw_iso_buffer_destroy() argument
133 dma_unmap_page(card->device, address, in fw_iso_buffer_destroy()
163 struct fw_iso_context *fw_iso_context_create(struct fw_card *card, in fw_iso_context_create() argument
169 ctx = card->driver->allocate_iso_context(card, in fw_iso_context_create()
174 ctx->card = card; in fw_iso_context_create()
188 ctx->card->driver->free_iso_context(ctx); in fw_iso_context_destroy()
195 return ctx->card->driver->start_iso(ctx, cycle, sync, tags); in fw_iso_context_start()
201 return ctx->card->driver->set_iso_channels(ctx, channels); in fw_iso_context_set_channels()
209 return ctx->card->driver->queue_iso(ctx, packet, buffer, payload); in fw_iso_context_queue()
215 ctx->card->driver->flush_queue_iso(ctx); in fw_iso_context_queue_flush()
221 return ctx->card->driver->flush_iso_completions(ctx); in fw_iso_context_flush_completions()
227 return ctx->card->driver->stop_iso(ctx); in fw_iso_context_stop()
235 static int manage_bandwidth(struct fw_card *card, int irm_id, int generation, in manage_bandwidth() argument
253 switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP, in manage_bandwidth()
273 static int manage_channel(struct fw_card *card, int irm_id, int generation, in manage_channel() argument
294 switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP, in manage_channel()
325 static void deallocate_channel(struct fw_card *card, int irm_id, in deallocate_channel() argument
335 manage_channel(card, irm_id, generation, mask, offset, false); in deallocate_channel()
362 void fw_iso_resource_manage(struct fw_card *card, int generation, in fw_iso_resource_manage() argument
370 spin_lock_irq(&card->lock); in fw_iso_resource_manage()
371 irm_id = card->irm_node->node_id; in fw_iso_resource_manage()
372 spin_unlock_irq(&card->lock); in fw_iso_resource_manage()
375 c = manage_channel(card, irm_id, generation, channels_hi, in fw_iso_resource_manage()
379 c = manage_channel(card, irm_id, generation, channels_lo, in fw_iso_resource_manage()
393 ret = manage_bandwidth(card, irm_id, generation, *bandwidth, allocate); in fw_iso_resource_manage()
399 deallocate_channel(card, irm_id, generation, c); in fw_iso_resource_manage()