Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=15536221d1f09ae7707f70a183045ee20d8bcf17
Commit:     15536221d1f09ae7707f70a183045ee20d8bcf17
Parent:     8a2f7d932fc6a4881ff837738e23b41a1c228338
Author:     Kristian Høgsberg <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 10 18:11:16 2007 -0400
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Thu Apr 12 00:18:57 2007 +0200

    firewire: Byteswap iso header so all headers are presented as be32.
    
    Signed-off-by: Kristian Høgsberg <[EMAIL PROTECTED]>
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
 drivers/firewire/fw-ohci.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index b941239..2229ea0 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1257,7 +1257,13 @@ static int handle_ir_dualbuffer_packet(struct context 
*context,
        p = db + 1;
        end = p + header_length;
        while (p < end && i + ctx->base.header_size <= PAGE_SIZE) {
-               memcpy(ctx->header + i, p + 4, ctx->base.header_size);
+               /* The iso header is byteswapped to little endian by
+                * the controller, but the remaining header quadlets
+                * are big endian.  We want to present all the headers
+                * as big endian, so we have to swap the first
+                * quadlet. */
+               *(u32 *) (ctx->header + i) = __swab32(*(u32 *) (p + 4));
+               memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4);
                i += ctx->base.header_size;
                p += ctx->base.header_size + 4;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to