firewire: fix async reception on big endian machines
[sfrench/cifs-2.6.git] / drivers / firewire / fw-ohci.c
index 0d08bf9b78c21d8f1811a317e5145ae577e4cc98..96c8ac5b86ccceaeed1ce0355b1f8c0c3cd1dda0 100644 (file)
@@ -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;
@@ -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);
@@ -1001,7 +1001,7 @@ static irqreturn_t irq_handler(int irq, void *data)
 
        event = reg_read(ohci, OHCI1394_IntEventClear);
 
-       if (!event)
+       if (!event || !~event)
                return IRQ_NONE;
 
        reg_write(ohci, OHCI1394_IntEventClear, event);