aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/firewire/fw-ohci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index b941239671d6..2229ea0b630e 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,
1257 p = db + 1; 1257 p = db + 1;
1258 end = p + header_length; 1258 end = p + header_length;
1259 while (p < end && i + ctx->base.header_size <= PAGE_SIZE) { 1259 while (p < end && i + ctx->base.header_size <= PAGE_SIZE) {
1260 memcpy(ctx->header + i, p + 4, ctx->base.header_size); 1260 /* The iso header is byteswapped to little endian by
1261 * the controller, but the remaining header quadlets
1262 * are big endian. We want to present all the headers
1263 * as big endian, so we have to swap the first
1264 * quadlet. */
1265 *(u32 *) (ctx->header + i) = __swab32(*(u32 *) (p + 4));
1266 memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4);
1261 i += ctx->base.header_size; 1267 i += ctx->base.header_size;
1262 p += ctx->base.header_size + 4; 1268 p += ctx->base.header_size + 4;
1263 } 1269 }