scsi: qla2xxx: Fix an endian bug in fcpcmd_is_corrupted()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 8 Sep 2018 08:42:27 +0000 (11:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:13:20 +0000 (09:13 +0200)
commitfccf159614b29580b4744b2dbd4ae65cb49e9f60
tree7713b53028638fab0cb832a1b92038f6fb37ca23
parent1a5d197564ba649df02a9ec472352917cf6f1072
scsi: qla2xxx: Fix an endian bug in fcpcmd_is_corrupted()

[ Upstream commit cbe3fd39d223f14b1c60c80fe9347a3dd08c2edb ]

We should first do the le16_to_cpu endian conversion and then apply the
FCP_CMD_LENGTH_MASK mask.

Fixes: 5f35509db179 ("qla2xxx: Terminate exchange if corrupted")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Quinn Tran <Quinn.Tran@cavium.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_target.h