aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-iso.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/core-iso.c')
-rw-r--r--drivers/firewire/core-iso.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c
index 28076c892d7e..166f19c6d38d 100644
--- a/drivers/firewire/core-iso.c
+++ b/drivers/firewire/core-iso.c
@@ -71,7 +71,7 @@ int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
71 for (j = 0; j < i; j++) { 71 for (j = 0; j < i; j++) {
72 address = page_private(buffer->pages[j]); 72 address = page_private(buffer->pages[j]);
73 dma_unmap_page(card->device, address, 73 dma_unmap_page(card->device, address,
74 PAGE_SIZE, DMA_TO_DEVICE); 74 PAGE_SIZE, direction);
75 __free_page(buffer->pages[j]); 75 __free_page(buffer->pages[j]);
76 } 76 }
77 kfree(buffer->pages); 77 kfree(buffer->pages);
@@ -80,6 +80,7 @@ int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
80 80
81 return -ENOMEM; 81 return -ENOMEM;
82} 82}
83EXPORT_SYMBOL(fw_iso_buffer_init);
83 84
84int fw_iso_buffer_map(struct fw_iso_buffer *buffer, struct vm_area_struct *vma) 85int fw_iso_buffer_map(struct fw_iso_buffer *buffer, struct vm_area_struct *vma)
85{ 86{
@@ -107,13 +108,14 @@ void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer,
107 for (i = 0; i < buffer->page_count; i++) { 108 for (i = 0; i < buffer->page_count; i++) {
108 address = page_private(buffer->pages[i]); 109 address = page_private(buffer->pages[i]);
109 dma_unmap_page(card->device, address, 110 dma_unmap_page(card->device, address,
110 PAGE_SIZE, DMA_TO_DEVICE); 111 PAGE_SIZE, buffer->direction);
111 __free_page(buffer->pages[i]); 112 __free_page(buffer->pages[i]);
112 } 113 }
113 114
114 kfree(buffer->pages); 115 kfree(buffer->pages);
115 buffer->pages = NULL; 116 buffer->pages = NULL;
116} 117}
118EXPORT_SYMBOL(fw_iso_buffer_destroy);
117 119
118struct fw_iso_context *fw_iso_context_create(struct fw_card *card, 120struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
119 int type, int channel, int speed, size_t header_size, 121 int type, int channel, int speed, size_t header_size,
@@ -136,6 +138,7 @@ struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
136 138
137 return ctx; 139 return ctx;
138} 140}
141EXPORT_SYMBOL(fw_iso_context_create);
139 142
140void fw_iso_context_destroy(struct fw_iso_context *ctx) 143void fw_iso_context_destroy(struct fw_iso_context *ctx)
141{ 144{
@@ -143,12 +146,14 @@ void fw_iso_context_destroy(struct fw_iso_context *ctx)
143 146
144 card->driver->free_iso_context(ctx); 147 card->driver->free_iso_context(ctx);
145} 148}
149EXPORT_SYMBOL(fw_iso_context_destroy);
146 150
147int fw_iso_context_start(struct fw_iso_context *ctx, 151int fw_iso_context_start(struct fw_iso_context *ctx,
148 int cycle, int sync, int tags) 152 int cycle, int sync, int tags)
149{ 153{
150 return ctx->card->driver->start_iso(ctx, cycle, sync, tags); 154 return ctx->card->driver->start_iso(ctx, cycle, sync, tags);
151} 155}
156EXPORT_SYMBOL(fw_iso_context_start);
152 157
153int fw_iso_context_queue(struct fw_iso_context *ctx, 158int fw_iso_context_queue(struct fw_iso_context *ctx,
154 struct fw_iso_packet *packet, 159 struct fw_iso_packet *packet,
@@ -159,11 +164,13 @@ int fw_iso_context_queue(struct fw_iso_context *ctx,
159 164
160 return card->driver->queue_iso(ctx, packet, buffer, payload); 165 return card->driver->queue_iso(ctx, packet, buffer, payload);
161} 166}
167EXPORT_SYMBOL(fw_iso_context_queue);
162 168
163int fw_iso_context_stop(struct fw_iso_context *ctx) 169int fw_iso_context_stop(struct fw_iso_context *ctx)
164{ 170{
165 return ctx->card->driver->stop_iso(ctx); 171 return ctx->card->driver->stop_iso(ctx);
166} 172}
173EXPORT_SYMBOL(fw_iso_context_stop);
167 174
168/* 175/*
169 * Isochronous bus resource management (channels, bandwidth), client side 176 * Isochronous bus resource management (channels, bandwidth), client side