Skip to contentSkip to conversation

: Update core_tmr_alloc_req() usage

PATCH New Nicholas A. Bellinger 1 participant 1 message Mar 25, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 5/5 : Update core_tmr_alloc_req() usage

Quoted 1 line

From a13a460d284e32dc62b55e00a20acc154b793e14 Mon Sep 17 00:00:00 2001

From: Nicholas Bellinger <[email protected]>
Date: Mon, 23 Mar 2009 22:42:05 -0700
Subject: [PATCH 5/5] [LIO-Target]: Update core_tmr_alloc_req() usage

This patch updates parameter usage of core_tmr_alloc_req() from target_core_mod in iscsi_target_mod code. It also removes an non-fatal error message from iscsi_handle_task_mgt_cmd() related to non ABORT_TASK iSCSI TMRs.

---
 drivers/lio-core/iscsi_target.c      |    4 +---
 drivers/lio-core/iscsi_target_util.c |    3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/lio-core/iscsi_target.c +1 -3
index 25a107a..33d1363 100644
@@ -2343,10 +2343,8 @@ static inline int iscsi_handle_task_mgt_cmd (
 				"implementation\n");
 		return(iscsi_add_reject(REASON_PROTOCOL_ERR, 1, buf, conn));
 	}
-	if ((hdr->function != ABORT_TASK) && (hdr->ref_cmd_sn != RESERVED)) {
-		TRACE_ERROR("RefCmdSN should be set to 0xFFFFFFFF.\n"); 
+	if ((hdr->function != ABORT_TASK) && (hdr->ref_cmd_sn != RESERVED))
 		hdr->ref_cmd_sn = RESERVED;
-	}
 
 	if (!(cmd = iscsi_allocate_se_cmd_for_tmr(conn, hdr->function))) 
 		return(iscsi_add_reject(REASON_OUT_OF_RESOURCES, 1, buf, conn));
drivers/lio-core/iscsi_target_util.c +2 -1
index bf74c32..7aa3c7e 100644
@@ -396,7 +396,8 @@ extern iscsi_cmd_t *iscsi_allocate_se_cmd_for_tmr (
 
 	se_cmd = cmd->se_cmd;
 
-	if (!(se_cmd->se_tmr_req = core_tmr_alloc_req((void *)cmd->tmr_req, function))) 
+	if (!(se_cmd->se_tmr_req = core_tmr_alloc_req(se_cmd,
+			(void *)cmd->tmr_req, function))) 
 		goto out;
 
 	cmd->tmr_req->se_tmr_req = se_cmd->se_tmr_req;
Signature · 1 line
1.5.4.1