diff options
author | Dilip Kumar Uppugandla <dilip@purestorage.com> | 2015-07-21 15:07:55 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-08-26 16:31:58 -0700 |
commit | 5155ce5f8395730f681fe48cdc8867838e3a3f2c (patch) | |
tree | 538781200ba7b67cd3dfbc259fff328405e5d97f /drivers/scsi/qla2xxx | |
parent | 2d041306b669e281427de7dd398e74335c9f5042 (diff) |
qla2xxx: Return the fabric command state for non-task management requests
Invoking get_cmd_state for qla2xxx always returns 0. Instead change it
to return the actual fabric state from qla_tgt_cmd. This will help with
debugging.
Signed-off-by: Dilip Kumar Uppugandla <dilip@purestorage.com>
Signed-off-by: Spencer Baugh <sbaugh@catern.com>
Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index d9a8c6084346..e8595867bb8d 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -420,6 +420,12 @@ static void tcm_qla2xxx_set_default_node_attrs(struct se_node_acl *nacl) static int tcm_qla2xxx_get_cmd_state(struct se_cmd *se_cmd) { + if (!(se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB)) { + struct qla_tgt_cmd *cmd = container_of(se_cmd, + struct qla_tgt_cmd, se_cmd); + return cmd->state; + } + return 0; } |