On 12/7/15, 6:48 PM, "target-devel-owner@vger.kernel.org on behalf of Christoph Hellwig" wrote: >> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c >>b/drivers/scsi/qla2xxx/tcm_qla2xxx.c >> index 842fcca..2e9c194 100644 >> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c >> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c >> @@ -617,6 +617,26 @@ static int tcm_qla2xxx_queue_status(struct se_cmd >>*se_cmd) >> struct qla_tgt_cmd, se_cmd); >> int xmit_type = QLA_TGT_XMIT_STATUS; >> >> + if (se_cmd->transport_state & CMD_T_ABORTED) { >> + /* For TCM TAS support n kernel >= 3.15: >> + * This cmd is attempting to respond with "Task Aborted Status". >> + */ >> + if (cmd->aborted) { >> + return 0; >> + } else if ((cmd->state == QLA_TGT_STATE_NEED_DATA) && >> + cmd->cmd_sent_to_fw) { >> + qlt_abort_cmd(cmd); >> + return 0; >> + } else if (cmd->state == QLA_TGT_STATE_PROCESSED) { >> + if (cmd->cmd_sent_to_fw) { >> + qlt_abort_cmd(cmd); >> + return 0; >> + } else { /* about to be free */ >> + return 0; >> + } >> + } >> + } >> + > >This is really something that should be explicitly communicated >from the core instead of having to second guess it. QT> The extra protection of the code here is to reduce erroneous error message and interaction error with our firmware. I think communicating back to the core at this stage might add undue complication. Itıs best to allow the initiator to re-drive the command at this point.