Lines Matching refs:conn
34 struct iscsit_conn *conn = cmd->conn; in iscsit_set_dataout_sequence_values() local
42 conn->sess->sess_ops->FirstBurstLength); in iscsit_set_dataout_sequence_values()
46 if (!conn->sess->sess_ops->DataSequenceInOrder) in iscsit_set_dataout_sequence_values()
52 conn->sess->sess_ops->MaxBurstLength) ? in iscsit_set_dataout_sequence_values()
54 conn->sess->sess_ops->MaxBurstLength) : cmd->se_cmd.data_length; in iscsit_set_dataout_sequence_values()
58 conn->sess->sess_ops->MaxBurstLength) >= in iscsit_set_dataout_sequence_values()
61 conn->sess->sess_ops->MaxBurstLength); in iscsit_set_dataout_sequence_values()
69 struct iscsit_conn *conn = cmd->conn; in iscsit_dataout_within_command_recovery_check() local
85 if (conn->sess->sess_ops->DataSequenceInOrder) { in iscsit_dataout_within_command_recovery_check()
103 if (conn->sess->sess_ops->DataPDUInOrder) { in iscsit_dataout_within_command_recovery_check()
128 return iscsit_dump_data_payload(conn, payload_length, 1); in iscsit_dataout_within_command_recovery_check()
136 struct iscsit_conn *conn = cmd->conn; in iscsit_dataout_check_unsolicited_sequence() local
153 if (first_burst_len > conn->sess->sess_ops->FirstBurstLength) { in iscsit_dataout_check_unsolicited_sequence()
156 first_burst_len, conn->sess->sess_ops->FirstBurstLength); in iscsit_dataout_check_unsolicited_sequence()
172 if (!conn->sess->sess_ops->DataPDUInOrder) in iscsit_dataout_check_unsolicited_sequence()
176 (first_burst_len != conn->sess->sess_ops->FirstBurstLength)) { in iscsit_dataout_check_unsolicited_sequence()
180 conn->sess->sess_ops->FirstBurstLength, in iscsit_dataout_check_unsolicited_sequence()
187 if (first_burst_len == conn->sess->sess_ops->FirstBurstLength) { in iscsit_dataout_check_unsolicited_sequence()
191 conn->sess->sess_ops->FirstBurstLength); in iscsit_dataout_check_unsolicited_sequence()
211 struct iscsit_conn *conn = cmd->conn; in iscsit_dataout_check_sequence() local
223 if (conn->sess->sess_ops->DataSequenceInOrder) { in iscsit_dataout_check_sequence()
237 if (iscsit_dump_data_payload(conn, payload_length, 1) < 0) in iscsit_dataout_check_sequence()
254 if (iscsit_dump_data_payload(conn, payload_length, 1) < 0) in iscsit_dataout_check_sequence()
262 if (next_burst_len > conn->sess->sess_ops->MaxBurstLength) { in iscsit_dataout_check_sequence()
267 payload_length, conn->sess->sess_ops->MaxBurstLength); in iscsit_dataout_check_sequence()
281 if (!conn->sess->sess_ops->DataPDUInOrder) in iscsit_dataout_check_sequence()
284 if (conn->sess->sess_ops->DataSequenceInOrder) { in iscsit_dataout_check_sequence()
286 conn->sess->sess_ops->MaxBurstLength) && in iscsit_dataout_check_sequence()
303 if (conn->sess->sess_ops->DataSequenceInOrder) { in iscsit_dataout_check_sequence()
305 conn->sess->sess_ops->MaxBurstLength) { in iscsit_dataout_check_sequence()
309 conn->sess->sess_ops->MaxBurstLength); in iscsit_dataout_check_sequence()
340 struct iscsit_conn *conn = cmd->conn; in iscsit_dataout_check_datasn() local
352 if (conn->sess->sess_ops->DataSequenceInOrder) in iscsit_dataout_check_datasn()
374 if (!conn->sess->sess_ops->ErrorRecoveryLevel) { in iscsit_dataout_check_datasn()
380 if (iscsit_dump_data_payload(conn, payload_length, 1) < 0) in iscsit_dataout_check_datasn()
391 struct iscsit_conn *conn = cmd->conn; in iscsit_dataout_pre_datapduinorder_yes() local
404 if (conn->sess->sess_ops->DataSequenceInOrder) { in iscsit_dataout_pre_datapduinorder_yes()
434 if (!conn->sess->sess_ops->ErrorRecoveryLevel) { in iscsit_dataout_pre_datapduinorder_yes()
440 if (iscsit_dump_data_payload(conn, payload_length, 1) < 0) in iscsit_dataout_pre_datapduinorder_yes()
472 return iscsit_dump_data_payload(cmd->conn, payload_length, 1); in iscsit_dataout_pre_datapduinorder_no()
537 struct iscsit_conn *conn = cmd->conn; in iscsit_dataout_post_crc_passed() local
544 conn->sess->sess_ops->FirstBurstLength) { in iscsit_dataout_post_crc_passed()
551 if (!conn->sess->sess_ops->DataPDUInOrder) { in iscsit_dataout_post_crc_passed()
561 if (conn->sess->sess_ops->DataSequenceInOrder) in iscsit_dataout_post_crc_passed()
576 if (conn->sess->sess_ops->DataSequenceInOrder) { in iscsit_dataout_post_crc_passed()
578 conn->sess->sess_ops->MaxBurstLength) { in iscsit_dataout_post_crc_passed()
586 if (!conn->sess->sess_ops->DataPDUInOrder) { in iscsit_dataout_post_crc_passed()
611 if (!conn->sess->sess_ops->DataPDUInOrder) { in iscsit_dataout_post_crc_passed()
630 if (send_r2t && conn->sess->sess_ops->DataSequenceInOrder) in iscsit_dataout_post_crc_passed()
647 struct iscsit_conn *conn = cmd->conn; in iscsit_dataout_post_crc_failed() local
652 if (conn->sess->sess_ops->DataPDUInOrder) in iscsit_dataout_post_crc_failed()
686 struct iscsit_conn *conn = cmd->conn; in iscsit_check_pre_dataout() local
710 return (conn->sess->sess_ops->DataPDUInOrder) ? in iscsit_check_pre_dataout()
724 struct iscsit_conn *conn = cmd->conn; in iscsit_check_post_dataout() local
731 if (!conn->sess->sess_ops->ErrorRecoveryLevel) { in iscsit_check_post_dataout()
822 void iscsit_connection_reinstatement_rcfr(struct iscsit_conn *conn) in iscsit_connection_reinstatement_rcfr() argument
824 spin_lock_bh(&conn->state_lock); in iscsit_connection_reinstatement_rcfr()
825 if (atomic_read(&conn->connection_exit)) { in iscsit_connection_reinstatement_rcfr()
826 spin_unlock_bh(&conn->state_lock); in iscsit_connection_reinstatement_rcfr()
830 if (atomic_read(&conn->transport_failed)) { in iscsit_connection_reinstatement_rcfr()
831 spin_unlock_bh(&conn->state_lock); in iscsit_connection_reinstatement_rcfr()
834 spin_unlock_bh(&conn->state_lock); in iscsit_connection_reinstatement_rcfr()
836 if (conn->tx_thread && conn->tx_thread_active) in iscsit_connection_reinstatement_rcfr()
837 send_sig(SIGINT, conn->tx_thread, 1); in iscsit_connection_reinstatement_rcfr()
838 if (conn->rx_thread && conn->rx_thread_active) in iscsit_connection_reinstatement_rcfr()
839 send_sig(SIGINT, conn->rx_thread, 1); in iscsit_connection_reinstatement_rcfr()
842 wait_for_completion(&conn->conn_wait_rcfr_comp); in iscsit_connection_reinstatement_rcfr()
843 complete(&conn->conn_post_wait_comp); in iscsit_connection_reinstatement_rcfr()
846 void iscsit_cause_connection_reinstatement(struct iscsit_conn *conn, int sleep) in iscsit_cause_connection_reinstatement() argument
848 spin_lock_bh(&conn->state_lock); in iscsit_cause_connection_reinstatement()
849 if (atomic_read(&conn->connection_exit)) { in iscsit_cause_connection_reinstatement()
850 spin_unlock_bh(&conn->state_lock); in iscsit_cause_connection_reinstatement()
854 if (atomic_read(&conn->transport_failed)) { in iscsit_cause_connection_reinstatement()
855 spin_unlock_bh(&conn->state_lock); in iscsit_cause_connection_reinstatement()
859 if (atomic_read(&conn->connection_reinstatement)) { in iscsit_cause_connection_reinstatement()
860 spin_unlock_bh(&conn->state_lock); in iscsit_cause_connection_reinstatement()
864 if (conn->tx_thread && conn->tx_thread_active) in iscsit_cause_connection_reinstatement()
865 send_sig(SIGINT, conn->tx_thread, 1); in iscsit_cause_connection_reinstatement()
866 if (conn->rx_thread && conn->rx_thread_active) in iscsit_cause_connection_reinstatement()
867 send_sig(SIGINT, conn->rx_thread, 1); in iscsit_cause_connection_reinstatement()
869 atomic_set(&conn->connection_reinstatement, 1); in iscsit_cause_connection_reinstatement()
871 spin_unlock_bh(&conn->state_lock); in iscsit_cause_connection_reinstatement()
875 atomic_set(&conn->sleep_on_conn_wait_comp, 1); in iscsit_cause_connection_reinstatement()
876 spin_unlock_bh(&conn->state_lock); in iscsit_cause_connection_reinstatement()
878 wait_for_completion(&conn->conn_wait_comp); in iscsit_cause_connection_reinstatement()
879 complete(&conn->conn_post_wait_comp); in iscsit_cause_connection_reinstatement()
891 static void iscsit_handle_connection_cleanup(struct iscsit_conn *conn) in iscsit_handle_connection_cleanup() argument
893 struct iscsit_session *sess = conn->sess; in iscsit_handle_connection_cleanup()
898 iscsit_connection_recovery_transport_reset(conn); in iscsit_handle_connection_cleanup()
901 " Connection ID: %hu from %s\n", conn->cid, in iscsit_handle_connection_cleanup()
903 iscsit_close_connection(conn); in iscsit_handle_connection_cleanup()
907 void iscsit_take_action_for_connection_exit(struct iscsit_conn *conn, bool *conn_freed) in iscsit_take_action_for_connection_exit() argument
911 spin_lock_bh(&conn->state_lock); in iscsit_take_action_for_connection_exit()
912 if (atomic_read(&conn->connection_exit)) { in iscsit_take_action_for_connection_exit()
913 spin_unlock_bh(&conn->state_lock); in iscsit_take_action_for_connection_exit()
916 atomic_set(&conn->connection_exit, 1); in iscsit_take_action_for_connection_exit()
918 if (conn->conn_state == TARG_CONN_STATE_IN_LOGOUT) { in iscsit_take_action_for_connection_exit()
919 spin_unlock_bh(&conn->state_lock); in iscsit_take_action_for_connection_exit()
920 iscsit_close_connection(conn); in iscsit_take_action_for_connection_exit()
925 if (conn->conn_state == TARG_CONN_STATE_CLEANUP_WAIT) { in iscsit_take_action_for_connection_exit()
926 spin_unlock_bh(&conn->state_lock); in iscsit_take_action_for_connection_exit()
931 conn->conn_state = TARG_CONN_STATE_CLEANUP_WAIT; in iscsit_take_action_for_connection_exit()
932 spin_unlock_bh(&conn->state_lock); in iscsit_take_action_for_connection_exit()
934 iscsit_handle_connection_cleanup(conn); in iscsit_take_action_for_connection_exit()