Lines Matching defs:context
99 struct context;
101 typedef int (*descriptor_callback_t)(struct context *ctx,
117 struct context {
165 struct context context;
206 struct context at_request_ctx;
207 struct context at_response_ctx;
216 u64 mc_channels; /* channels in use by the multichannel IR context */
1098 struct context *ctx = (struct context *) data;
1141 * context. Must be called with ohci->lock held.
1143 static int context_add_buffer(struct context *ctx)
1177 static int context_init(struct context *ctx, struct fw_ohci *ohci,
1210 static void context_release(struct context *ctx)
1222 static struct descriptor *context_get_descriptors(struct context *ctx,
1253 static void context_run(struct context *ctx, u32 extra)
1265 static void context_append(struct context *ctx,
1301 static void context_stop(struct context *ctx)
1318 ohci_err(ohci, "DMA context still active (0x%08x)\n", reg);
1331 static int at_context_queue_packet(struct context *ctx,
1461 static void at_context_flush(struct context *ctx)
1472 static int handle_at_packet(struct context *context,
1478 struct fw_ohci *ohci = context->ohci;
1481 if (last->transfer_status == 0 && !context->flushing)
1515 if (context->flushing)
1537 if (context->flushing) {
1634 static void handle_local_request(struct context *ctx, struct fw_packet *packet)
1675 static void at_context_transmit(struct context *ctx, struct fw_packet *packet)
1711 ohci_err(ohci, "DMA context %s has stopped, error code: %s\n",
2068 * This next bit is unrelated to the AT context stuff but we
2157 &ohci->ir_context_list[i].context.tasklet);
2169 &ohci->it_context_list[i].context.tasklet);
2600 struct context *ctx = &ohci->at_request_ctx;
2817 static int handle_ir_packet_per_buffer(struct context *context,
2822 container_of(context, struct iso_context, context);
2836 dma_sync_single_range_for_cpu(context->ohci->card.device,
2852 static int handle_ir_buffer_fill(struct context *context,
2857 container_of(context, struct iso_context, context);
2875 dma_sync_single_range_for_cpu(context->ohci->card.device,
2892 dma_sync_single_range_for_cpu(ctx->context.ohci->card.device,
2903 static inline void sync_it_packet_for_cpu(struct context *context,
2918 * data buffer is in the context program's coherent page and must not
2922 (context->current_bus & PAGE_MASK)) {
2930 dma_sync_single_range_for_cpu(context->ohci->card.device,
2940 static int handle_it_packet(struct context *context,
2945 container_of(context, struct iso_context, context);
2956 sync_it_packet_for_cpu(context, d);
3054 ret = context_init(&ctx->context, ohci, regs, callback);
3090 struct fw_ohci *ohci = ctx->context.ohci;
3095 if (ctx->context.last->branch_address == 0)
3108 context_run(&ctx->context, match);
3124 reg_write(ohci, CONTEXT_MATCH(ctx->context.regs), match);
3125 context_run(&ctx->context, control);
3155 context_stop(&ctx->context);
3156 tasklet_kill(&ctx->context.tasklet);
3169 context_release(&ctx->context);
3236 if (ctx->context.running)
3242 if (ctx->context.running)
3283 d = context_get_descriptors(&ctx->context, z + header_z, &d_bus);
3292 * a context to skip a cycle whenever lost cycles or FIFO
3295 * FIXME: Make the context's cycle-lost behaviour configurable?
3329 dma_sync_single_range_for_device(ctx->context.ohci->card.device,
3347 context_append(&ctx->context, d, z, header_z);
3357 struct device *device = ctx->context.ohci->card.device;
3380 d = context_get_descriptors(&ctx->context,
3427 context_append(&ctx->context, d, z, header_z);
3453 d = context_get_descriptors(&ctx->context, 1, &d_bus);
3475 dma_sync_single_range_for_device(ctx->context.ohci->card.device,
3483 context_append(&ctx->context, d, 1, 0);
3498 spin_lock_irqsave(&ctx->context.ohci->lock, flags);
3510 spin_unlock_irqrestore(&ctx->context.ohci->lock, flags);
3517 struct context *ctx =
3518 &container_of(base, struct iso_context, base)->context;
3528 tasklet_disable_in_atomic(&ctx->context.tasklet);
3531 context_tasklet((unsigned long)&ctx->context);
3551 tasklet_enable(&ctx->context.tasklet);