diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 05:17:39 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 05:17:39 -0400 |
| commit | 7c1953ddb609f1c161bf4a11a5e4e4577e82e557 (patch) | |
| tree | 283244582f4fafd15a2ddf52971e0e5ff048af47 | |
| parent | 1bc67188c3843b8e16caaa8624beeb0e2823c1f8 (diff) | |
| parent | b91bf5bf7fb0f35a8119a662e8e6b71ed950f443 (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: (62 commits)
target: Fix compile warning w/ missing module.h include
target: Remove legacy se_task->task_timer and associated logic
target: Fix incorrect transport_sent usage
target: re-use the command S/G list for single-task commands
target: Fix BIDI t_task_cdb handling in transport_generic_new_cmd
target: remove transport_allocate_tasks
target: merge transport_new_cmd_obj into transport_generic_new_cmd
target: remove the task_sg_bidi field se_task and pSCSI BIDI support
target: transport_subsystem_check_init cleanups
target: use a workqueue for I/O completions
target: remove unused TRANSPORT_ states
target: remove TRANSPORT_DEFERRED_CMD state
target: remove the TRANSPORT_REMOVE state
target: move depth_left manipulation out of transport_generic_request_failure
target: stop task timers earlier
target: remove TF_TIMER_STOP
target: factor some duplicate code for stopping a task
target: fix list walking in transport_free_dev_tasks
target: use transport_cmd_check_stop_to_fabric consistently
target: do not pass the queue object to transport_remove_cmd_from_queue
...
36 files changed, 937 insertions, 2068 deletions
diff --git a/drivers/target/Makefile b/drivers/target/Makefile index 1060c7b7f803..62e54053bcd8 100644 --- a/drivers/target/Makefile +++ b/drivers/target/Makefile | |||
| @@ -6,7 +6,6 @@ target_core_mod-y := target_core_configfs.o \ | |||
| 6 | target_core_hba.o \ | 6 | target_core_hba.o \ |
| 7 | target_core_pr.o \ | 7 | target_core_pr.o \ |
| 8 | target_core_alua.o \ | 8 | target_core_alua.o \ |
| 9 | target_core_scdb.o \ | ||
| 10 | target_core_tmr.o \ | 9 | target_core_tmr.o \ |
| 11 | target_core_tpg.o \ | 10 | target_core_tpg.o \ |
| 12 | target_core_transport.o \ | 11 | target_core_transport.o \ |
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 6a4ea29c2f36..4d01768fcd90 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
| @@ -765,7 +765,7 @@ static int iscsit_allocate_iovecs(struct iscsi_cmd *cmd) | |||
| 765 | u32 iov_count = (cmd->se_cmd.t_data_nents == 0) ? 1 : | 765 | u32 iov_count = (cmd->se_cmd.t_data_nents == 0) ? 1 : |
| 766 | cmd->se_cmd.t_data_nents; | 766 | cmd->se_cmd.t_data_nents; |
| 767 | 767 | ||
| 768 | iov_count += TRANSPORT_IOV_DATA_BUFFER; | 768 | iov_count += ISCSI_IOV_DATA_BUFFER; |
| 769 | 769 | ||
| 770 | cmd->iov_data = kzalloc(iov_count * sizeof(struct kvec), GFP_KERNEL); | 770 | cmd->iov_data = kzalloc(iov_count * sizeof(struct kvec), GFP_KERNEL); |
| 771 | if (!cmd->iov_data) { | 771 | if (!cmd->iov_data) { |
| @@ -3538,16 +3538,8 @@ get_immediate: | |||
| 3538 | spin_lock_bh(&conn->cmd_lock); | 3538 | spin_lock_bh(&conn->cmd_lock); |
| 3539 | list_del(&cmd->i_list); | 3539 | list_del(&cmd->i_list); |
| 3540 | spin_unlock_bh(&conn->cmd_lock); | 3540 | spin_unlock_bh(&conn->cmd_lock); |
| 3541 | /* | 3541 | |
| 3542 | * Determine if a struct se_cmd is assoicated with | 3542 | iscsit_free_cmd(cmd); |
| 3543 | * this struct iscsi_cmd. | ||
| 3544 | */ | ||
| 3545 | if (!(cmd->se_cmd.se_cmd_flags & SCF_SE_LUN_CMD) && | ||
| 3546 | !(cmd->tmr_req)) | ||
| 3547 | iscsit_release_cmd(cmd); | ||
| 3548 | else | ||
| 3549 | transport_generic_free_cmd(&cmd->se_cmd, | ||
| 3550 | 1, 0); | ||
| 3551 | goto get_immediate; | 3543 | goto get_immediate; |
| 3552 | case ISTATE_SEND_NOPIN_WANT_RESPONSE: | 3544 | case ISTATE_SEND_NOPIN_WANT_RESPONSE: |
| 3553 | spin_unlock_bh(&cmd->istate_lock); | 3545 | spin_unlock_bh(&cmd->istate_lock); |
| @@ -3940,7 +3932,6 @@ static void iscsit_release_commands_from_conn(struct iscsi_conn *conn) | |||
| 3940 | { | 3932 | { |
| 3941 | struct iscsi_cmd *cmd = NULL, *cmd_tmp = NULL; | 3933 | struct iscsi_cmd *cmd = NULL, *cmd_tmp = NULL; |
| 3942 | struct iscsi_session *sess = conn->sess; | 3934 | struct iscsi_session *sess = conn->sess; |
| 3943 | struct se_cmd *se_cmd; | ||
| 3944 | /* | 3935 | /* |
| 3945 | * We expect this function to only ever be called from either RX or TX | 3936 | * We expect this function to only ever be called from either RX or TX |
| 3946 | * thread context via iscsit_close_connection() once the other context | 3937 | * thread context via iscsit_close_connection() once the other context |
| @@ -3948,35 +3939,13 @@ static void iscsit_release_commands_from_conn(struct iscsi_conn *conn) | |||
| 3948 | */ | 3939 | */ |
| 3949 | spin_lock_bh(&conn->cmd_lock); | 3940 | spin_lock_bh(&conn->cmd_lock); |
| 3950 | list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_list) { | 3941 | list_for_each_entry_safe(cmd, cmd_tmp, &conn->conn_cmd_list, i_list) { |
| 3951 | if (!(cmd->se_cmd.se_cmd_flags & SCF_SE_LUN_CMD)) { | ||
| 3952 | 3942 | ||
| 3953 | list_del(&cmd->i_list); | ||
| 3954 | spin_unlock_bh(&conn->cmd_lock); | ||
| 3955 | iscsit_increment_maxcmdsn(cmd, sess); | ||
| 3956 | se_cmd = &cmd->se_cmd; | ||
| 3957 | /* | ||
| 3958 | * Special cases for active iSCSI TMR, and | ||
| 3959 | * transport_lookup_cmd_lun() failing from | ||
| 3960 | * iscsit_get_lun_for_cmd() in iscsit_handle_scsi_cmd(). | ||
| 3961 | */ | ||
| 3962 | if (cmd->tmr_req && se_cmd->transport_wait_for_tasks) | ||
| 3963 | se_cmd->transport_wait_for_tasks(se_cmd, 1, 1); | ||
| 3964 | else if (cmd->se_cmd.se_cmd_flags & SCF_SE_LUN_CMD) | ||
| 3965 | transport_release_cmd(se_cmd); | ||
| 3966 | else | ||
| 3967 | iscsit_release_cmd(cmd); | ||
| 3968 | |||
| 3969 | spin_lock_bh(&conn->cmd_lock); | ||
| 3970 | continue; | ||
| 3971 | } | ||
| 3972 | list_del(&cmd->i_list); | 3943 | list_del(&cmd->i_list); |
| 3973 | spin_unlock_bh(&conn->cmd_lock); | 3944 | spin_unlock_bh(&conn->cmd_lock); |
| 3974 | 3945 | ||
| 3975 | iscsit_increment_maxcmdsn(cmd, sess); | 3946 | iscsit_increment_maxcmdsn(cmd, sess); |
| 3976 | se_cmd = &cmd->se_cmd; | ||
| 3977 | 3947 | ||
| 3978 | if (se_cmd->transport_wait_for_tasks) | 3948 | iscsit_free_cmd(cmd); |
| 3979 | se_cmd->transport_wait_for_tasks(se_cmd, 1, 1); | ||
| 3980 | 3949 | ||
| 3981 | spin_lock_bh(&conn->cmd_lock); | 3950 | spin_lock_bh(&conn->cmd_lock); |
| 3982 | } | 3951 | } |
diff --git a/drivers/target/iscsi/iscsi_target_auth.c b/drivers/target/iscsi/iscsi_target_auth.c index 11fd74307811..beb39469e7f1 100644 --- a/drivers/target/iscsi/iscsi_target_auth.c +++ b/drivers/target/iscsi/iscsi_target_auth.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | * GNU General Public License for more details. | 18 | * GNU General Public License for more details. |
| 19 | ******************************************************************************/ | 19 | ******************************************************************************/ |
| 20 | 20 | ||
| 21 | #include <linux/kernel.h> | ||
| 21 | #include <linux/string.h> | 22 | #include <linux/string.h> |
| 22 | #include <linux/crypto.h> | 23 | #include <linux/crypto.h> |
| 23 | #include <linux/err.h> | 24 | #include <linux/err.h> |
| @@ -27,40 +28,11 @@ | |||
| 27 | #include "iscsi_target_nego.h" | 28 | #include "iscsi_target_nego.h" |
| 28 | #include "iscsi_target_auth.h" | 29 | #include "iscsi_target_auth.h" |
| 29 | 30 | ||
| 30 | static unsigned char chap_asciihex_to_binaryhex(unsigned char val[2]) | ||
