Skip to content

Commit

Permalink
firewire: ohci: copy_iso_headers(): make comment match the code
Browse files Browse the repository at this point in the history
The comment incorrectly talked about one little-endian quadlet, while
there are actually two.  Furthermore, the endianness of the remaining
headers depends on whatever protocol is used, so don't mention them.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Clemens Ladisch authored and Stefan Richter committed Mar 18, 2012
1 parent a7611e8 commit 32c507f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2685,10 +2685,9 @@ static void copy_iso_headers(struct iso_context *ctx, void *p)
return;

/*
* 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.
* The two iso header quadlets are byteswapped to little
* endian by the controller, but we want to present them
* as big endian for consistency with the bus endianness.
*/
if (ctx->base.header_size > 0)
*(u32 *) (ctx->header + i) = __swab32(*(u32 *) (p + 4));
Expand Down

0 comments on commit 32c507f

Please sign in to comment.