From 34949e6f2d73bfc5130829f5c97a24859bcdd8fa Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 3 Apr 2009 17:49:49 +0000 Subject: [PATCH] Cleanups and minor, but needed for 1.0.1, fixes git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/1.0.1.x@745 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- doc/scst_user_spec.txt | 2 +- scst/src/scst_lib.c | 5 +++-- scst/src/scst_targ.c | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/scst_user_spec.txt b/doc/scst_user_spec.txt index 97ea7a8ff..205de39fe 100644 --- a/doc/scst_user_spec.txt +++ b/doc/scst_user_spec.txt @@ -2,7 +2,7 @@ USER SPACE INTERFACE DESCRIPTION. - Version 1.0.0 + Version 1.0.1 I. Description. diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index afe5bbc9c..a308ef66a 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -652,6 +652,8 @@ int scst_get_cmd_abnormal_done_state(const struct scst_cmd *cmd) break; default: + PRINT_CRIT_ERROR("Wrong cmd state %d (cmd %p, op %x)", + cmd->state, cmd, cmd->cdb[0]); sBUG(); } @@ -666,12 +668,11 @@ void scst_set_cmd_abnormal_done_state(struct scst_cmd *cmd) #ifdef CONFIG_SCST_EXTRACHECKS switch (cmd->state) { - case SCST_CMD_STATE_PRE_XMIT_RESP: case SCST_CMD_STATE_XMIT_RESP: case SCST_CMD_STATE_FINISHED: case SCST_CMD_STATE_FINISHED_INTERNAL: case SCST_CMD_STATE_XMIT_WAIT: - PRINT_CRIT_ERROR("Wrong cmd state %x (cmd %p, op %x)", + PRINT_CRIT_ERROR("Wrong cmd state %d (cmd %p, op %x)", cmd->state, cmd, cmd->cdb[0]); sBUG(); } diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index b03efc044..b0e2fb694 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -1097,7 +1097,7 @@ void scst_rx_data(struct scst_cmd *cmd, int status, switch (status) { case SCST_RX_STATUS_SUCCESS: #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) - if (cmd->tgt_sg) { + if ((trace_flag & TRACE_RCV_BOT) && (cmd->tgt_sg != NULL)) { int i; struct scatterlist *sg = cmd->tgt_sg; TRACE_RECV_BOT("RX data for cmd %p " @@ -1355,7 +1355,7 @@ static void scst_cmd_done_local(struct scst_cmd *cmd, int next_state, #if defined(CONFIG_SCST_DEBUG) if (next_state == SCST_CMD_STATE_PRE_DEV_DONE) { - if (cmd->sg) { + if ((trace_flag & TRACE_RCV_TOP) && (cmd->sg != NULL)) { int i; struct scatterlist *sg = cmd->sg; TRACE_RECV_TOP("Exec'd %d S/G(s) at %p sg[0].page at " @@ -2883,7 +2883,7 @@ static int scst_xmit_response(struct scst_cmd *cmd) TRACE_DBG("Calling xmit_response(%p)", cmd); #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) - if (cmd->tgt_sg) { + if ((trace_flag & TRACE_SND_BOT) && (cmd->tgt_sg != NULL)) { int i; struct scatterlist *sg = cmd->tgt_sg; TRACE(TRACE_SND_BOT, "Xmitting data for cmd %p "