Skip to content

Commit

Permalink
firewire: fix async reception on big endian machines
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Richter committed Jun 29, 2007
1 parent 0471448 commit 0a9972b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/firewire/fw-ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ static void ar_context_tasklet(unsigned long data)

offset = offsetof(struct ar_buffer, data);
dma_unmap_single(ohci->card.device,
ab->descriptor.data_address - offset,
PAGE_SIZE, DMA_BIDIRECTIONAL);
le32_to_cpu(ab->descriptor.data_address) - offset,
PAGE_SIZE, DMA_BIDIRECTIONAL);

buffer = ab;
ab = ab->next;
Expand Down Expand Up @@ -427,7 +427,7 @@ static void ar_context_run(struct ar_context *ctx)
size_t offset;

offset = offsetof(struct ar_buffer, data);
ab_bus = ab->descriptor.data_address - offset;
ab_bus = le32_to_cpu(ab->descriptor.data_address) - offset;

reg_write(ctx->ohci, COMMAND_PTR(ctx->regs), ab_bus | 1);
reg_write(ctx->ohci, CONTROL_SET(ctx->regs), CONTEXT_RUN);
Expand Down

0 comments on commit 0a9972b

Please sign in to comment.