aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/tcm_qla2xxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/tcm_qla2xxx.c')
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index b20da0d27ad7..3f82ea1b72dc 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -500,7 +500,6 @@ static int tcm_qla2xxx_handle_cmd(scsi_qla_host_t *vha, struct qla_tgt_cmd *cmd,
500static void tcm_qla2xxx_handle_data_work(struct work_struct *work) 500static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
501{ 501{
502 struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work); 502 struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work);
503 unsigned long flags;
504 503
505 /* 504 /*
506 * Ensure that the complete FCP WRITE payload has been received. 505 * Ensure that the complete FCP WRITE payload has been received.
@@ -508,17 +507,6 @@ static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
508 */ 507 */
509 cmd->cmd_in_wq = 0; 508 cmd->cmd_in_wq = 0;
510 509
511 spin_lock_irqsave(&cmd->cmd_lock, flags);
512 cmd->data_work = 1;
513 if (cmd->aborted) {
514 cmd->data_work_free = 1;
515 spin_unlock_irqrestore(&cmd->cmd_lock, flags);
516
517 tcm_qla2xxx_free_cmd(cmd);
518 return;
519 }
520 spin_unlock_irqrestore(&cmd->cmd_lock, flags);
521
522 cmd->qpair->tgt_counters.qla_core_ret_ctio++; 510 cmd->qpair->tgt_counters.qla_core_ret_ctio++;
523 if (!cmd->write_data_transferred) { 511 if (!cmd->write_data_transferred) {
524 /* 512 /*
@@ -765,31 +753,13 @@ static void tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd)
765 qlt_xmit_tm_rsp(mcmd); 753 qlt_xmit_tm_rsp(mcmd);
766} 754}
767 755
768#define DATA_WORK_NOT_FREE(_cmd) (_cmd->data_work && !_cmd->data_work_free)
769static void tcm_qla2xxx_aborted_task(struct se_cmd *se_cmd) 756static void tcm_qla2xxx_aborted_task(struct se_cmd *se_cmd)
770{ 757{
771 struct qla_tgt_cmd *cmd = container_of(se_cmd, 758 struct qla_tgt_cmd *cmd = container_of(se_cmd,
772 struct qla_tgt_cmd, se_cmd); 759 struct qla_tgt_cmd, se_cmd);
773 unsigned long flags;
774 760
775 if (qlt_abort_cmd(cmd)) 761 if (qlt_abort_cmd(cmd))
776 return; 762 return;
777
778 spin_lock_irqsave(&cmd->cmd_lock, flags);
779 if ((cmd->state == QLA_TGT_STATE_NEW)||
780 ((cmd->state == QLA_TGT_STATE_DATA_IN) &&
781 DATA_WORK_NOT_FREE(cmd))) {
782 cmd->data_work_free = 1;
783 spin_unlock_irqrestore(&cmd->cmd_lock, flags);
784 /*
785 * cmd has not reached fw, Use this trigger to free it.
786 */
787 tcm_qla2xxx_free_cmd(cmd);
788 return;
789 }
790 spin_unlock_irqrestore(&cmd->cmd_lock, flags);
791 return;
792
793} 763}
794 764
795static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *, 765static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *,