Lines Matching refs:ib_conn

153 static void iser_create_send_desc(struct iser_conn	*ib_conn,  in iser_create_send_desc()  argument
156 struct iser_device *device = ib_conn->device; in iser_create_send_desc()
173 static int iser_alloc_rx_descriptors(struct iser_conn *ib_conn) in iser_alloc_rx_descriptors() argument
179 struct iser_device *device = ib_conn->device; in iser_alloc_rx_descriptors()
181 ib_conn->rx_descs = kmalloc(ISER_QP_MAX_RECV_DTOS * in iser_alloc_rx_descriptors()
183 if (!ib_conn->rx_descs) in iser_alloc_rx_descriptors()
186 rx_desc = ib_conn->rx_descs; in iser_alloc_rx_descriptors()
202 ib_conn->rx_desc_head = 0; in iser_alloc_rx_descriptors()
206 rx_desc = ib_conn->rx_descs; in iser_alloc_rx_descriptors()
210 kfree(ib_conn->rx_descs); in iser_alloc_rx_descriptors()
211 ib_conn->rx_descs = NULL; in iser_alloc_rx_descriptors()
217 void iser_free_rx_descriptors(struct iser_conn *ib_conn) in iser_free_rx_descriptors() argument
221 struct iser_device *device = ib_conn->device; in iser_free_rx_descriptors()
223 if (ib_conn->login_buf) { in iser_free_rx_descriptors()
224 ib_dma_unmap_single(device->ib_device, ib_conn->login_dma, in iser_free_rx_descriptors()
226 kfree(ib_conn->login_buf); in iser_free_rx_descriptors()
229 if (!ib_conn->rx_descs) in iser_free_rx_descriptors()
232 rx_desc = ib_conn->rx_descs; in iser_free_rx_descriptors()
236 kfree(ib_conn->rx_descs); in iser_free_rx_descriptors()
250 BUG_ON(iser_conn->ib_conn->post_recv_buf_count != 0); in iser_conn_set_full_featured_mode()
251 BUG_ON(atomic_read(&iser_conn->ib_conn->post_send_buf_count) != 0); in iser_conn_set_full_featured_mode()
253 if (iser_alloc_rx_descriptors(iser_conn->ib_conn)) in iser_conn_set_full_featured_mode()
257 if (iser_post_recvm(iser_conn->ib_conn, ISER_MIN_POSTED_RX)) in iser_conn_set_full_featured_mode()
282 iser_create_send_desc(iser_conn->ib_conn, tx_desc); in iser_send_command()
313 err = iser_post_send(iser_conn->ib_conn, tx_desc); in iser_send_command()
378 err = iser_post_send(iser_conn->ib_conn, tx_desc); in iser_send_data_out()
400 iser_create_send_desc(iser_conn->ib_conn, mdesc); in iser_send_control()
402 device = iser_conn->ib_conn->device; in iser_send_control()
412 memcpy(iser_conn->ib_conn->login_buf, task->data, in iser_send_control()
414 tx_dsg->addr = iser_conn->ib_conn->login_dma; in iser_send_control()
421 err = iser_post_recvl(iser_conn->ib_conn); in iser_send_control()
426 err = iser_post_send(iser_conn->ib_conn, mdesc); in iser_send_control()
440 struct iser_conn *ib_conn) in iser_rcv_completion() argument
442 struct iscsi_iser_conn *conn = ib_conn->iser_conn; in iser_rcv_completion()
448 if ((char *)rx_desc == ib_conn->login_buf) { in iser_rcv_completion()
449 rx_dma = ib_conn->login_dma; in iser_rcv_completion()
456 ib_dma_sync_single_for_cpu(ib_conn->device->ib_device, rx_dma, in iser_rcv_completion()
467 ib_dma_sync_single_for_device(ib_conn->device->ib_device, rx_dma, in iser_rcv_completion()
474 conn->ib_conn->post_recv_buf_count--; in iser_rcv_completion()
476 if (rx_dma == ib_conn->login_dma) in iser_rcv_completion()
479 outstanding = ib_conn->post_recv_buf_count; in iser_rcv_completion()
483 err = iser_post_recvm(ib_conn, count); in iser_rcv_completion()
490 struct iser_conn *ib_conn) in iser_snd_completion() argument
493 struct iser_device *device = ib_conn->device; in iser_snd_completion()
501 atomic_dec(&ib_conn->post_send_buf_count); in iser_snd_completion()