]> err.no Git - linux-2.6/commitdiff
firewire: Add missing byteswapping for receive DMA programs.
authorKristian Høgsberg <krh@redhat.com>
Tue, 22 May 2007 22:55:48 +0000 (18:55 -0400)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 27 May 2007 21:21:00 +0000 (23:21 +0200)
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-ohci.c

index c17342d3e6fd01089e2f058613a3167433926441..2e4cfa57126d618254c9abf42f9f3b4bfc54718b 100644 (file)
@@ -268,7 +268,7 @@ static int ar_context_add_page(struct ar_context *ctx)
 
        dma_sync_single_for_device(dev, ab_bus, PAGE_SIZE, DMA_BIDIRECTIONAL);
 
-       ctx->last_buffer->descriptor.branch_address = ab_bus | 1;
+       ctx->last_buffer->descriptor.branch_address = cpu_to_le32(ab_bus | 1);
        ctx->last_buffer->next = ab;
        ctx->last_buffer = ab;
 
@@ -417,7 +417,8 @@ ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci, u32 regs)
        ctx->current_buffer = ab.next;
        ctx->pointer = ctx->current_buffer->data;
 
-       reg_write(ctx->ohci, COMMAND_PTR(ctx->regs), ab.descriptor.branch_address);
+       reg_write(ctx->ohci, COMMAND_PTR(ctx->regs),
+                 le32_to_cpu(ab.descriptor.branch_address));
        reg_write(ctx->ohci, CONTROL_SET(ctx->regs), CONTEXT_RUN);
        flush_writes(ctx->ohci);