public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qla2xxx: Return the fabric command state for non-task management requests
@ 2015-07-21 22:07 Spencer Baugh
  2015-07-21 23:00 ` Himanshu Madhani
  2015-07-23  9:46 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Spencer Baugh @ 2015-07-21 22:07 UTC (permalink / raw)
  To: supporter:QLOGIC QLA2XXX FC-SCSI DRIVER, James E.J. Bottomley,
	open list:QLOGIC QLA2XXX FC-SCSI DRIVER, open list
  Cc: Joern Engel, Spencer Baugh, Dilip Kumar Uppugandla, Spencer Baugh

From: Dilip Kumar Uppugandla <dilip@purestorage.com>

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>
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index d9a8c60..e859586 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;
 }
 
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-27 23:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 22:07 [PATCH] qla2xxx: Return the fabric command state for non-task management requests Spencer Baugh
2015-07-21 23:00 ` Himanshu Madhani
2015-07-23  9:46 ` Christoph Hellwig
     [not found]   ` <CAGxsngq1aBCoqmdSZcX+o=Ef=NyQSeunqDQuo2iwgmOAxsEqDw@mail.gmail.com>
2015-07-25  6:29     ` Christoph Hellwig
2015-07-27 23:25       ` Quinn Tran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox