X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Ffirewire%2Ffw-iso.c;h=bcbe794a3ea5ca3198df3c1593ef696edf0f716c;hb=c7843e8f565f624b0cff7cad1370fad4cb84dfbc;hp=4e7ba8672929c67b6ad4d68854bc962cb25fdf6b;hpb=9aad8125389a7a2990dee72d7892e22330a945eb;p=linux-2.6 diff --git a/drivers/firewire/fw-iso.c b/drivers/firewire/fw-iso.c index 4e7ba86729..bcbe794a3e 100644 --- a/drivers/firewire/fw-iso.c +++ b/drivers/firewire/fw-iso.c @@ -1,6 +1,6 @@ -/* -*- c-basic-offset: 8 -*- +/* + * Isochronous IO functionality * - * fw-iso.c - Isochronous IO * Copyright (C) 2006 Kristian Hoegsberg * * This program is free software; you can redistribute it and/or modify @@ -44,10 +44,10 @@ fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, goto out; for (i = 0; i < buffer->page_count; i++) { - buffer->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32); + buffer->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); if (buffer->pages[i] == NULL) goto out_pages; - + address = dma_map_page(card->device, buffer->pages[i], 0, PAGE_SIZE, direction); if (dma_mapping_error(address)) { @@ -105,24 +105,27 @@ void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, buffer->pages = NULL; } -struct fw_iso_context *fw_iso_context_create(struct fw_card *card, int type, - fw_iso_callback_t callback, - void *callback_data) +struct fw_iso_context * +fw_iso_context_create(struct fw_card *card, int type, + int channel, int speed, size_t header_size, + fw_iso_callback_t callback, void *callback_data) { struct fw_iso_context *ctx; - ctx = card->driver->allocate_iso_context(card, type); + ctx = card->driver->allocate_iso_context(card, type, header_size); if (IS_ERR(ctx)) return ctx; ctx->card = card; ctx->type = type; + ctx->channel = channel; + ctx->speed = speed; + ctx->header_size = header_size; ctx->callback = callback; ctx->callback_data = callback_data; return ctx; } -EXPORT_SYMBOL(fw_iso_context_create); void fw_iso_context_destroy(struct fw_iso_context *ctx) { @@ -130,18 +133,12 @@ void fw_iso_context_destroy(struct fw_iso_context *ctx) card->driver->free_iso_context(ctx); } -EXPORT_SYMBOL(fw_iso_context_destroy); int -fw_iso_context_send(struct fw_iso_context *ctx, - int channel, int speed, int cycle) +fw_iso_context_start(struct fw_iso_context *ctx, int cycle, int sync, int tags) { - ctx->channel = channel; - ctx->speed = speed; - - return ctx->card->driver->send_iso(ctx, cycle); + return ctx->card->driver->start_iso(ctx, cycle, sync, tags); } -EXPORT_SYMBOL(fw_iso_context_send); int fw_iso_context_queue(struct fw_iso_context *ctx, @@ -153,4 +150,9 @@ fw_iso_context_queue(struct fw_iso_context *ctx, return card->driver->queue_iso(ctx, packet, buffer, payload); } -EXPORT_SYMBOL(fw_iso_context_queue); + +int +fw_iso_context_stop(struct fw_iso_context *ctx) +{ + return ctx->card->driver->stop_iso(ctx); +}