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