aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_tmr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_tmr.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_tmr.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/target/iscsi/iscsi_target_tmr.c b/drivers/target/iscsi/iscsi_target_tmr.c
index e01da9d2b37e..f4e640b51fd1 100644
--- a/drivers/target/iscsi/iscsi_target_tmr.c
+++ b/drivers/target/iscsi/iscsi_target_tmr.c
@@ -78,10 +78,7 @@ int iscsit_tmr_task_warm_reset(
78{ 78{
79 struct iscsi_session *sess = conn->sess; 79 struct iscsi_session *sess = conn->sess;
80 struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess); 80 struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
81#if 0 81
82 struct iscsi_init_task_mgt_cmnd *hdr =
83 (struct iscsi_init_task_mgt_cmnd *) buf;
84#endif
85 if (!na->tmr_warm_reset) { 82 if (!na->tmr_warm_reset) {
86 pr_err("TMR Opcode TARGET_WARM_RESET authorization" 83 pr_err("TMR Opcode TARGET_WARM_RESET authorization"
87 " failed for Initiator Node: %s\n", 84 " failed for Initiator Node: %s\n",
@@ -216,7 +213,7 @@ static int iscsit_task_reassign_complete_nop_out(
216 iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess); 213 iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess);
217 214
218 spin_lock_bh(&conn->cmd_lock); 215 spin_lock_bh(&conn->cmd_lock);
219 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 216 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
220 spin_unlock_bh(&conn->cmd_lock); 217 spin_unlock_bh(&conn->cmd_lock);
221 218
222 cmd->i_state = ISTATE_SEND_NOPIN; 219 cmd->i_state = ISTATE_SEND_NOPIN;
@@ -272,9 +269,9 @@ static int iscsit_task_reassign_complete_write(
272 offset = cmd->next_burst_len = cmd->write_data_done; 269 offset = cmd->next_burst_len = cmd->write_data_done;
273 270
274 if ((conn->sess->sess_ops->FirstBurstLength - offset) >= 271 if ((conn->sess->sess_ops->FirstBurstLength - offset) >=
275 cmd->data_length) { 272 cmd->se_cmd.data_length) {
276 no_build_r2ts = 1; 273 no_build_r2ts = 1;
277 length = (cmd->data_length - offset); 274 length = (cmd->se_cmd.data_length - offset);
278 } else 275 } else
279 length = (conn->sess->sess_ops->FirstBurstLength - offset); 276 length = (conn->sess->sess_ops->FirstBurstLength - offset);
280 277
@@ -292,7 +289,7 @@ static int iscsit_task_reassign_complete_write(
292 /* 289 /*
293 * iscsit_build_r2ts_for_cmd() can handle the rest from here. 290 * iscsit_build_r2ts_for_cmd() can handle the rest from here.
294 */ 291 */
295 return iscsit_build_r2ts_for_cmd(cmd, conn, 2); 292 return iscsit_build_r2ts_for_cmd(cmd, conn, true);
296} 293}
297 294
298static int iscsit_task_reassign_complete_read( 295static int iscsit_task_reassign_complete_read(
@@ -385,7 +382,7 @@ static int iscsit_task_reassign_complete_scsi_cmnd(
385 iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess); 382 iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess);
386 383
387 spin_lock_bh(&conn->cmd_lock); 384 spin_lock_bh(&conn->cmd_lock);
388 list_add_tail(&cmd->i_list, &conn->conn_cmd_list); 385 list_add_tail(&cmd->i_conn_node, &conn->conn_cmd_list);
389 spin_unlock_bh(&conn->cmd_lock); 386 spin_unlock_bh(&conn->cmd_lock);
390 387
391 if (se_cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) { 388 if (se_cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) {