Skip to content

Commit

Permalink
arcmsr: endianness bug
Browse files Browse the repository at this point in the history
initializing a field in data shared with the card with
cpu_to_le32(something) | 0x100000 is broken - the field is, indeed,
little-endian and we need cpu_to_le32() on both parts.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 29, 2007
1 parent 80da1ad commit 6a7d26d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/arcmsr/arcmsr_hba.c
Original file line number Diff line number Diff line change
@@ -916,7 +916,7 @@ static void arcmsr_build_ccb(struct AdapterControlBlock *acb,

pdma_sg->addresshigh = address_hi;
pdma_sg->address = address_lo;
pdma_sg->length = length|IS_SG64_ADDR;
pdma_sg->length = length|cpu_to_le32(IS_SG64_ADDR);
psge += sizeof (struct SG64ENTRY);
arccdbsize += sizeof (struct SG64ENTRY);
}

0 comments on commit 6a7d26d

Please sign in to comment.