Lines Matching refs:iser_conn

143 static void iser_create_send_desc(struct iser_conn *iser_conn,  in iser_create_send_desc()  argument
147 struct iser_device *device = iser_conn->ib_conn.device; in iser_create_send_desc()
160 static void iser_free_login_buf(struct iser_conn *iser_conn) in iser_free_login_buf() argument
162 struct iser_device *device = iser_conn->ib_conn.device; in iser_free_login_buf()
163 struct iser_login_desc *desc = &iser_conn->login_desc; in iser_free_login_buf()
182 static int iser_alloc_login_buf(struct iser_conn *iser_conn) in iser_alloc_login_buf() argument
184 struct iser_device *device = iser_conn->ib_conn.device; in iser_alloc_login_buf()
185 struct iser_login_desc *desc = &iser_conn->login_desc; in iser_alloc_login_buf()
223 int iser_alloc_rx_descriptors(struct iser_conn *iser_conn, in iser_alloc_rx_descriptors() argument
230 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_alloc_rx_descriptors()
233 iser_conn->qp_max_recv_dtos = session->cmds_max; in iser_alloc_rx_descriptors()
236 iser_conn->pages_per_mr)) in iser_alloc_rx_descriptors()
239 if (iser_alloc_login_buf(iser_conn)) in iser_alloc_rx_descriptors()
242 iser_conn->num_rx_descs = session->cmds_max; in iser_alloc_rx_descriptors()
243 iser_conn->rx_descs = kmalloc_array(iser_conn->num_rx_descs, in iser_alloc_rx_descriptors()
246 if (!iser_conn->rx_descs) in iser_alloc_rx_descriptors()
249 rx_desc = iser_conn->rx_descs; in iser_alloc_rx_descriptors()
251 for (i = 0; i < iser_conn->qp_max_recv_dtos; i++, rx_desc++) { in iser_alloc_rx_descriptors()
268 rx_desc = iser_conn->rx_descs; in iser_alloc_rx_descriptors()
272 kfree(iser_conn->rx_descs); in iser_alloc_rx_descriptors()
273 iser_conn->rx_descs = NULL; in iser_alloc_rx_descriptors()
275 iser_free_login_buf(iser_conn); in iser_alloc_rx_descriptors()
283 void iser_free_rx_descriptors(struct iser_conn *iser_conn) in iser_free_rx_descriptors() argument
287 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_free_rx_descriptors()
292 rx_desc = iser_conn->rx_descs; in iser_free_rx_descriptors()
293 for (i = 0; i < iser_conn->qp_max_recv_dtos; i++, rx_desc++) in iser_free_rx_descriptors()
296 kfree(iser_conn->rx_descs); in iser_free_rx_descriptors()
298 iser_conn->rx_descs = NULL; in iser_free_rx_descriptors()
300 iser_free_login_buf(iser_conn); in iser_free_rx_descriptors()
305 struct iser_conn *iser_conn = conn->dd_data; in iser_post_rx_bufs() local
321 iser_conn->qp_max_recv_dtos - 1); in iser_post_rx_bufs()
328 for (i = 1; i < iser_conn->qp_max_recv_dtos; i++) { in iser_post_rx_bufs()
329 err = iser_post_recvm(iser_conn, &iser_conn->rx_descs[i]); in iser_post_rx_bufs()
344 struct iser_conn *iser_conn = conn->dd_data; in iser_send_command() local
356 iser_create_send_desc(iser_conn, tx_desc, ISCSI_TX_SCSI_COMMAND, in iser_send_command()
397 err = iser_post_send(&iser_conn->ib_conn, tx_desc); in iser_send_command()
415 struct iser_conn *iser_conn = conn->dd_data; in iser_send_data_out() local
463 err = iser_post_send(&iser_conn->ib_conn, tx_desc); in iser_send_data_out()
475 struct iser_conn *iser_conn = conn->dd_data; in iser_send_control() local
483 iser_create_send_desc(iser_conn, mdesc, ISCSI_TX_CONTROL, in iser_send_control()
486 device = iser_conn->ib_conn.device; in iser_send_control()
491 struct iser_login_desc *desc = &iser_conn->login_desc; in iser_send_control()
516 err = iser_post_recvl(iser_conn); in iser_send_control()
524 err = iser_post_send(&iser_conn->ib_conn, mdesc); in iser_send_control()
536 struct iser_conn *iser_conn = to_iser_conn(ib_conn); in iser_login_rsp() local
562 iscsi_iser_recv(iser_conn->iscsi_conn, hdr, data, length); in iser_login_rsp()
569 iser_conn->iscsi_conn->session->discovery_sess) in iser_login_rsp()
573 iser_post_recvm(iser_conn, iser_conn->rx_descs); in iser_login_rsp()
592 static int iser_check_remote_inv(struct iser_conn *iser_conn, struct ib_wc *wc, in iser_check_remote_inv() argument
600 iser_conn, rkey); in iser_check_remote_inv()
602 if (unlikely(!iser_conn->snd_w_inv)) { in iser_check_remote_inv()
604 iser_conn); in iser_check_remote_inv()
608 task = iscsi_itt_to_ctask(iser_conn->iscsi_conn, hdr->itt); in iser_check_remote_inv()
637 struct iser_conn *iser_conn = to_iser_conn(ib_conn); in iser_task_rsp() local
657 if (iser_check_remote_inv(iser_conn, wc, hdr)) { in iser_task_rsp()
658 iscsi_conn_failure(iser_conn->iscsi_conn, in iser_task_rsp()
663 iscsi_iser_recv(iser_conn->iscsi_conn, hdr, desc->data, length); in iser_task_rsp()
669 err = iser_post_recvm(iser_conn, desc); in iser_task_rsp()