aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 22:00:42 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 22:00:42 -0500
commit6aad3738f6a79fd0ca480eaceefe064cc471f6eb (patch)
tree08fb9ec4824bf3320af01f29fe84b75f814c0fa0 /drivers/target/iscsi
parent02ebbbd481635fd3ce7018e5bb19c18c0f1e4561 (diff)
parent5bda90c8f20f0af93375721533f4081a40fa6f41 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: use ->exectute_task for all CDB emulation target: remove SCF_EMULATE_CDB_ASYNC target: refactor transport_emulate_control_cdb target: pass the se_task to the CDB emulation callback target: split core_scsi3_emulate_pr target: split core_scsi2_emulate_crh target: Add generic active I/O shutdown logic target: add back error handling in transport_complete_task target/pscsi: blk_make_request() returns an ERR_PTR() target: Remove core TRANSPORT_FREE_CMD_INTR usage target: Make TFO->check_stop_free return free status iscsi-target: Fix non-immediate TMR handling iscsi-target: Add missing CMDSN_LOWER_THAN_EXP check in iscsit_handle_scsi_cmd target: Avoid double list_del for aborted se_tmr_req target: Minor cleanups to core_tmr_drain_tmr_list target: Fix wrong se_tmr being added to drain_tmr_list target: Fix incorrect se_cmd assignment in core_tmr_drain_tmr_list target: Check -ENOMEM to signal QUEUE_FULL from fabric callbacks tcm_loop: Add explict read buffer memset for SCF_SCSI_CONTROL_SG_IO_CDB target: Fix compile warning w/ missing module.h include
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r--drivers/target/iscsi/iscsi_target.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 4d01768fcd90..1bf057ed9931 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1079,7 +1079,9 @@ attach_cmd:
1079 */ 1079 */
1080 if (!cmd->immediate_data) { 1080 if (!cmd->immediate_data) {
1081 cmdsn_ret = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn); 1081 cmdsn_ret = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn);
1082 if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) 1082 if (cmdsn_ret == CMDSN_LOWER_THAN_EXP)
1083 return 0;
1084 else if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER)
1083 return iscsit_add_reject_from_cmd( 1085 return iscsit_add_reject_from_cmd(
1084 ISCSI_REASON_PROTOCOL_ERROR, 1086 ISCSI_REASON_PROTOCOL_ERROR,
1085 1, 0, buf, cmd); 1087 1, 0, buf, cmd);
@@ -1819,17 +1821,16 @@ attach:
1819 int cmdsn_ret = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn); 1821 int cmdsn_ret = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn);
1820 if (cmdsn_ret == CMDSN_HIGHER_THAN_EXP) 1822 if (cmdsn_ret == CMDSN_HIGHER_THAN_EXP)
1821 out_of_order_cmdsn = 1; 1823 out_of_order_cmdsn = 1;
1822 else if (cmdsn_ret == CMDSN_LOWER_THAN_EXP) { 1824 else if (cmdsn_ret == CMDSN_LOWER_THAN_EXP)
1823 return 0; 1825 return 0;
1824 } else { /* (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) */ 1826 else if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER)
1825 return iscsit_add_reject_from_cmd( 1827 return iscsit_add_reject_from_cmd(
1826 ISCSI_REASON_PROTOCOL_ERROR, 1828 ISCSI_REASON_PROTOCOL_ERROR,
1827 1, 0, buf, cmd); 1829 1, 0, buf, cmd);
1828 }
1829 } 1830 }
1830 iscsit_ack_from_expstatsn(conn, hdr->exp_statsn); 1831 iscsit_ack_from_expstatsn(conn, hdr->exp_statsn);
1831 1832
1832 if (out_of_order_cmdsn) 1833 if (out_of_order_cmdsn || !(hdr->opcode & ISCSI_OP_IMMEDIATE))
1833 return 0; 1834 return 0;
1834 /* 1835 /*
1835 * Found the referenced task, send to transport for processing. 1836 * Found the referenced task, send to transport for processing.