]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
qla2xxx: Use ATIO type to send correct tmr response
authorSwapnil Nagle <swapnil.nagle@purestorage.com>
Thu, 4 Feb 2016 16:45:17 +0000 (11:45 -0500)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 7 Feb 2016 03:44:35 +0000 (19:44 -0800)
The function value inside se_cmd can change if the TMR is cancelled.
Use original ATIO Type to correctly determine CTIO response.

Signed-off-by: Swapnil Nagle <swapnil.nagle@purestroage.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/qla2xxx/qla_target.c

index 74eb776d2faa3c59d27bc166705bbbb98e9bb546..46c6679794118bc92f04068215e6ba708edc6953 100644 (file)
@@ -1756,7 +1756,7 @@ void qlt_xmit_tm_rsp(struct qla_tgt_mgmt_cmd *mcmd)
                qlt_send_notify_ack(vha, &mcmd->orig_iocb.imm_ntfy,
                    0, 0, 0, 0, 0, 0);
        else {
-               if (mcmd->se_cmd.se_tmr_req->function == TMR_ABORT_TASK)
+               if (mcmd->orig_iocb.atio.u.raw.entry_type == ABTS_RECV_24XX)
                        qlt_24xx_send_abts_resp(vha, &mcmd->orig_iocb.abts,
                            mcmd->fc_tm_rsp, false);
                else