aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-06-23 14:28:17 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-06-29 11:32:07 -0400
commit0a9972baa7454c747fd5f67ce864420dff99d383 (patch)
treeb7e85d0d47e05f35b3c4c5fa4ffe9c97a35a134c /drivers
parent0471448f4d017470995d8a2272dc8c06dbed3b77 (diff)
firewire: fix async reception on big endian machines
descriptor.data_address is little endian Tested-by: Olaf Hering <olh@suse.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firewire/fw-ohci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index b72a5c1f9e69..96c8ac5b86cc 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -373,8 +373,8 @@ static void ar_context_tasklet(unsigned long data)
373 373
374 offset = offsetof(struct ar_buffer, data); 374 offset = offsetof(struct ar_buffer, data);
375 dma_unmap_single(ohci->card.device, 375 dma_unmap_single(ohci->card.device,
376 ab->descriptor.data_address - offset, 376 le32_to_cpu(ab->descriptor.data_address) - offset,
377 PAGE_SIZE, DMA_BIDIRECTIONAL); 377 PAGE_SIZE, DMA_BIDIRECTIONAL);
378 378
379 buffer = ab; 379 buffer = ab;
380 ab = ab->next; 380 ab = ab->next;
@@ -427,7 +427,7 @@ static void ar_context_run(struct ar_context *ctx)
427 size_t offset; 427 size_t offset;
428 428
429 offset = offsetof(struct ar_buffer, data); 429 offset = offsetof(struct ar_buffer, data);
430 ab_bus = ab->descriptor.data_address - offset; 430 ab_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
431 431
432 reg_write(ctx->ohci, COMMAND_PTR(ctx->regs), ab_bus | 1); 432 reg_write(ctx->ohci, COMMAND_PTR(ctx->regs), ab_bus | 1);
433 reg_write(ctx->ohci, CONTROL_SET(ctx->regs), CONTEXT_RUN); 433 reg_write(ctx->ohci, CONTROL_SET(ctx->regs), CONTEXT_RUN);