Skip to contentSkip to conversation

arcmsr: endianness bug

PATCH Al Viro 1 participant 1 message Oct 29, 2007 SCSI

lore
Share & tools
lore

Al Viro

author
#0 lore raw

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.

---
 drivers/scsi/arcmsr/arcmsr_hba.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/arcmsr/arcmsr_hba.c +1 -1
index 152af46..acbc50f 100644
@@ -932,7 +932,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);
 			}
Signature · 1 line
1.5.3.GIT