Commit cbe3fd39 authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen
Browse files

scsi: qla2xxx: Fix an endian bug in fcpcmd_is_corrupted()

We should first do the le16_to_cpu endian conversion and then apply the

Fixes: 5f35509d

 ("qla2xxx: Terminate exchange if corrupted")
Signed-off-by: default avatarDan Carpenter <>
Acked-by: default avatarQuinn Tran <>
Acked-by: default avatarHimanshu Madhani <>
Signed-off-by: default avatarMartin K. Petersen <>
parent 679fcae4
......@@ -374,8 +374,8 @@ struct atio_from_isp {
static inline int fcpcmd_is_corrupted(struct atio *atio)
if (atio->entry_type == ATIO_TYPE7 &&
(le16_to_cpu(atio->attr_n_length & FCP_CMD_LENGTH_MASK) <
((le16_to_cpu(atio->attr_n_length) & FCP_CMD_LENGTH_MASK) <
return 1;
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment