qla2xxx: Fix endianness of task management response code
authorRoland Dreier <roland@purestorage.com>
Tue, 18 Sep 2012 22:10:56 +0000 (15:10 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 22 Sep 2012 23:23:24 +0000 (16:23 -0700)
commite4b11b89f9039ca97b2ed1b6efeb6749fbdeb252
treeea95c5b7fb3e00bfac8991571cafb5467ea6ac13
parent37bb7899ca366dc212b71b150e78566d04808cc0
qla2xxx: Fix endianness of task management response code

The qla2xxx firmware actually expects the task management response
code in a CTIO IOCB with SCSI status mode 1 to be in little-endian
byte order, ie the response code should be the first byte in the
sense_data[] array.  The old code erroneously byte-swapped the
response code, which puts it in the wrong place on the wire and leads
to initiators thinking every task management request succeeds (since
they see 0 in the byte where they look for the response code).

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: Chad Dupuis <chad.dupuis@qlogic.com>
Cc: Arun Easi <arun.easi@qlogic.com>
Acked-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/qla2xxx/qla_target.c