Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5155ce5f authored by Dilip Kumar Uppugandla's avatar Dilip Kumar Uppugandla Committed by James Bottomley
Browse files

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: default avatarDilip Kumar Uppugandla <dilip@purestorage.com>
Signed-off-by: default avatarSpencer Baugh <sbaugh@catern.com>
Acked-by: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 2d041306
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;
}