Lines Matching refs:context
112 struct context;
114 typedef int (*descriptor_callback_t)(struct context *ctx,
130 struct context { struct
178 struct context context; member
219 struct context at_request_ctx;
220 struct context at_response_ctx;
1069 struct context *ctx = (struct context *) data; in context_tasklet()
1114 static int context_add_buffer(struct context *ctx) in context_add_buffer()
1143 static int context_init(struct context *ctx, struct fw_ohci *ohci, in context_init()
1176 static void context_release(struct context *ctx) in context_release()
1188 static struct descriptor *context_get_descriptors(struct context *ctx, in context_get_descriptors()
1219 static void context_run(struct context *ctx, u32 extra) in context_run()
1231 static void context_append(struct context *ctx, in context_append()
1267 static void context_stop(struct context *ctx) in context_stop()
1297 static int at_context_queue_packet(struct context *ctx, in at_context_queue_packet()
1427 static void at_context_flush(struct context *ctx) in at_context_flush()
1438 static int handle_at_packet(struct context *context, in handle_at_packet() argument
1444 struct fw_ohci *ohci = context->ohci; in handle_at_packet()
1447 if (last->transfer_status == 0 && !context->flushing) in handle_at_packet()
1481 if (context->flushing) in handle_at_packet()
1503 if (context->flushing) { in handle_at_packet()
1600 static void handle_local_request(struct context *ctx, struct fw_packet *packet) in handle_local_request()
1639 static void at_context_transmit(struct context *ctx, struct fw_packet *packet) in at_context_transmit()
2112 &ohci->ir_context_list[i].context.tasklet); in irq_handler()
2124 &ohci->it_context_list[i].context.tasklet); in irq_handler()
2556 struct context *ctx = &ohci->at_request_ctx; in ohci_cancel_packet()
2769 static int handle_ir_packet_per_buffer(struct context *context, in handle_ir_packet_per_buffer() argument
2774 container_of(context, struct iso_context, context); in handle_ir_packet_per_buffer()
2788 dma_sync_single_range_for_cpu(context->ohci->card.device, in handle_ir_packet_per_buffer()
2804 static int handle_ir_buffer_fill(struct context *context, in handle_ir_buffer_fill() argument
2809 container_of(context, struct iso_context, context); in handle_ir_buffer_fill()
2827 dma_sync_single_range_for_cpu(context->ohci->card.device, in handle_ir_buffer_fill()
2844 dma_sync_single_range_for_cpu(ctx->context.ohci->card.device, in flush_ir_buffer_fill()
2855 static inline void sync_it_packet_for_cpu(struct context *context, in sync_it_packet_for_cpu() argument
2874 (context->current_bus & PAGE_MASK)) { in sync_it_packet_for_cpu()
2882 dma_sync_single_range_for_cpu(context->ohci->card.device, in sync_it_packet_for_cpu()
2892 static int handle_it_packet(struct context *context, in handle_it_packet() argument
2897 container_of(context, struct iso_context, context); in handle_it_packet()
2908 sync_it_packet_for_cpu(context, d); in handle_it_packet()
3007 ret = context_init(&ctx->context, ohci, regs, callback); in ohci_allocate_iso_context()
3043 struct fw_ohci *ohci = ctx->context.ohci; in ohci_start_iso()
3048 if (ctx->context.last->branch_address == 0) in ohci_start_iso()
3061 context_run(&ctx->context, match); in ohci_start_iso()
3077 reg_write(ohci, CONTEXT_MATCH(ctx->context.regs), match); in ohci_start_iso()
3078 context_run(&ctx->context, control); in ohci_start_iso()
3108 context_stop(&ctx->context); in ohci_stop_iso()
3109 tasklet_kill(&ctx->context.tasklet); in ohci_stop_iso()
3122 context_release(&ctx->context); in ohci_free_iso_context()
3189 if (ctx->context.running) in ohci_resume_iso_dma()
3195 if (ctx->context.running) in ohci_resume_iso_dma()
3236 d = context_get_descriptors(&ctx->context, z + header_z, &d_bus); in queue_iso_transmit()
3282 dma_sync_single_range_for_device(ctx->context.ohci->card.device, in queue_iso_transmit()
3300 context_append(&ctx->context, d, z, header_z); in queue_iso_transmit()
3310 struct device *device = ctx->context.ohci->card.device; in queue_iso_packet_per_buffer()
3333 d = context_get_descriptors(&ctx->context, in queue_iso_packet_per_buffer()
3380 context_append(&ctx->context, d, z, header_z); in queue_iso_packet_per_buffer()
3406 d = context_get_descriptors(&ctx->context, 1, &d_bus); in queue_iso_buffer_fill()
3428 dma_sync_single_range_for_device(ctx->context.ohci->card.device, in queue_iso_buffer_fill()
3436 context_append(&ctx->context, d, 1, 0); in queue_iso_buffer_fill()
3451 spin_lock_irqsave(&ctx->context.ohci->lock, flags); in ohci_queue_iso()
3463 spin_unlock_irqrestore(&ctx->context.ohci->lock, flags); in ohci_queue_iso()
3470 struct context *ctx = in ohci_flush_queue_iso()
3471 &container_of(base, struct iso_context, base)->context; in ohci_flush_queue_iso()
3481 tasklet_disable(&ctx->context.tasklet); in ohci_flush_iso_completions()
3484 context_tasklet((unsigned long)&ctx->context); in ohci_flush_iso_completions()
3504 tasklet_enable(&ctx->context.tasklet); in ohci_flush_iso_completions()