Lines Matching refs:iser_conn
198 struct iser_conn *iser_conn = task->conn->dd_data; in iser_initialize_task_headers() local
199 struct iser_device *device = iser_conn->ib_conn.device; in iser_initialize_task_headers()
203 if (unlikely(iser_conn->state != ISER_CONN_UP)) in iser_initialize_task_headers()
219 iser_task->iser_conn = iser_conn; in iser_initialize_task_headers()
368 struct iser_conn *iser_conn = task->conn->dd_data; in iscsi_iser_cleanup_task() local
369 struct iser_device *device = iser_conn->ib_conn.device; in iscsi_iser_cleanup_task()
457 struct iser_conn *iser_conn; in iscsi_iser_conn_bind() local
473 iser_conn = ep->dd_data; in iscsi_iser_conn_bind()
475 mutex_lock(&iser_conn->state_mutex); in iscsi_iser_conn_bind()
476 if (iser_conn->state != ISER_CONN_UP) { in iscsi_iser_conn_bind()
479 iser_conn, iser_conn->state); in iscsi_iser_conn_bind()
483 error = iser_alloc_rx_descriptors(iser_conn, conn->session); in iscsi_iser_conn_bind()
490 iser_info("binding iscsi conn %p to iser_conn %p\n", conn, iser_conn); in iscsi_iser_conn_bind()
492 conn->dd_data = iser_conn; in iscsi_iser_conn_bind()
493 iser_conn->iscsi_conn = conn; in iscsi_iser_conn_bind()
497 mutex_unlock(&iser_conn->state_mutex); in iscsi_iser_conn_bind()
512 struct iser_conn *iser_conn; in iscsi_iser_conn_start() local
515 iser_conn = iscsi_conn->dd_data; in iscsi_iser_conn_start()
516 reinit_completion(&iser_conn->stop_completion); in iscsi_iser_conn_start()
534 struct iser_conn *iser_conn = conn->dd_data; in iscsi_iser_conn_stop() local
536 iser_info("stopping iscsi_conn: %p, iser_conn: %p\n", conn, iser_conn); in iscsi_iser_conn_stop()
542 if (iser_conn) { in iscsi_iser_conn_stop()
543 mutex_lock(&iser_conn->state_mutex); in iscsi_iser_conn_stop()
545 iser_conn_terminate(iser_conn); in iscsi_iser_conn_stop()
549 iser_conn->iscsi_conn = NULL; in iscsi_iser_conn_stop()
553 complete(&iser_conn->stop_completion); in iscsi_iser_conn_stop()
554 mutex_unlock(&iser_conn->state_mutex); in iscsi_iser_conn_stop()
610 struct iser_conn *iser_conn = NULL; in iscsi_iser_session_create() local
630 iser_conn = ep->dd_data; in iscsi_iser_session_create()
631 shost->sg_tablesize = iser_conn->scsi_sg_tablesize; in iscsi_iser_session_create()
632 shost->can_queue = min_t(u16, cmds_max, iser_conn->max_cmds); in iscsi_iser_session_create()
634 mutex_lock(&iser_conn->state_mutex); in iscsi_iser_session_create()
635 if (iser_conn->state != ISER_CONN_UP) { in iscsi_iser_session_create()
637 iser_conn); in iscsi_iser_session_create()
638 mutex_unlock(&iser_conn->state_mutex); in iscsi_iser_session_create()
642 ib_conn = &iser_conn->ib_conn; in iscsi_iser_session_create()
657 mutex_unlock(&iser_conn->state_mutex); in iscsi_iser_session_create()
660 mutex_unlock(&iser_conn->state_mutex); in iscsi_iser_session_create()
671 iser_conn, shost->sg_tablesize, in iscsi_iser_session_create()
765 struct iser_conn *iser_conn = ep->dd_data; in iscsi_iser_get_ep_param() local
770 if (!iser_conn || !iser_conn->ib_conn.cma_id) in iscsi_iser_get_ep_param()
774 &iser_conn->ib_conn.cma_id->route.addr.dst_addr, in iscsi_iser_get_ep_param()
802 struct iser_conn *iser_conn; in iscsi_iser_ep_connect() local
809 iser_conn = kzalloc(sizeof(*iser_conn), GFP_KERNEL); in iscsi_iser_ep_connect()
810 if (!iser_conn) { in iscsi_iser_ep_connect()
815 ep->dd_data = iser_conn; in iscsi_iser_ep_connect()
816 iser_conn->ep = ep; in iscsi_iser_ep_connect()
817 iser_conn_init(iser_conn); in iscsi_iser_ep_connect()
819 err = iser_connect(iser_conn, NULL, dst_addr, non_blocking); in iscsi_iser_ep_connect()
844 struct iser_conn *iser_conn = ep->dd_data; in iscsi_iser_ep_poll() local
847 rc = wait_for_completion_interruptible_timeout(&iser_conn->up_completion, in iscsi_iser_ep_poll()
851 mutex_lock(&iser_conn->state_mutex); in iscsi_iser_ep_poll()
852 if (iser_conn->state == ISER_CONN_TERMINATING || in iscsi_iser_ep_poll()
853 iser_conn->state == ISER_CONN_DOWN) in iscsi_iser_ep_poll()
855 mutex_unlock(&iser_conn->state_mutex); in iscsi_iser_ep_poll()
858 iser_info("iser conn %p rc = %d\n", iser_conn, rc); in iscsi_iser_ep_poll()
879 struct iser_conn *iser_conn = ep->dd_data; in iscsi_iser_ep_disconnect() local
881 iser_info("ep %p iser conn %p\n", ep, iser_conn); in iscsi_iser_ep_disconnect()
883 mutex_lock(&iser_conn->state_mutex); in iscsi_iser_ep_disconnect()
884 iser_conn_terminate(iser_conn); in iscsi_iser_ep_disconnect()
892 if (iser_conn->iscsi_conn) { in iscsi_iser_ep_disconnect()
893 INIT_WORK(&iser_conn->release_work, iser_release_work); in iscsi_iser_ep_disconnect()
894 queue_work(release_wq, &iser_conn->release_work); in iscsi_iser_ep_disconnect()
895 mutex_unlock(&iser_conn->state_mutex); in iscsi_iser_ep_disconnect()
897 iser_conn->state = ISER_CONN_DOWN; in iscsi_iser_ep_disconnect()
898 mutex_unlock(&iser_conn->state_mutex); in iscsi_iser_ep_disconnect()
899 iser_conn_release(iser_conn); in iscsi_iser_ep_disconnect()
1063 struct iser_conn *iser_conn, *n; in iser_exit() local
1076 list_for_each_entry_safe(iser_conn, n, &ig.connlist, in iser_exit()
1078 iser_conn_release(iser_conn); in iser_exit()