Lines Matching full:rx_desc
150 struct iser_rx_desc *rx_desc; in isert_alloc_rx_descriptors() local
161 rx_desc = isert_conn->rx_descs; in isert_alloc_rx_descriptors()
163 for (i = 0; i < ISERT_QP_MAX_RECV_DTOS; i++, rx_desc++) { in isert_alloc_rx_descriptors()
164 dma_addr = ib_dma_map_single(ib_dev, rx_desc->buf, in isert_alloc_rx_descriptors()
169 rx_desc->dma_addr = dma_addr; in isert_alloc_rx_descriptors()
171 rx_sg = &rx_desc->rx_sg; in isert_alloc_rx_descriptors()
172 rx_sg->addr = rx_desc->dma_addr + isert_get_hdr_offset(rx_desc); in isert_alloc_rx_descriptors()
175 rx_desc->rx_cqe.done = isert_recv_done; in isert_alloc_rx_descriptors()
181 rx_desc = isert_conn->rx_descs; in isert_alloc_rx_descriptors()
182 for (j = 0; j < i; j++, rx_desc++) { in isert_alloc_rx_descriptors()
183 ib_dma_unmap_single(ib_dev, rx_desc->dma_addr, in isert_alloc_rx_descriptors()
196 struct iser_rx_desc *rx_desc; in isert_free_rx_descriptors() local
202 rx_desc = isert_conn->rx_descs; in isert_free_rx_descriptors()
203 for (i = 0; i < ISERT_QP_MAX_RECV_DTOS; i++, rx_desc++) { in isert_free_rx_descriptors()
204 ib_dma_unmap_single(ib_dev, rx_desc->dma_addr, in isert_free_rx_descriptors()
731 struct iser_rx_desc *rx_desc; in isert_post_recvm() local
734 rx_desc = &isert_conn->rx_descs[i]; in isert_post_recvm()
736 rx_wr->wr_cqe = &rx_desc->rx_cqe; in isert_post_recvm()
737 rx_wr->sg_list = &rx_desc->rx_sg; in isert_post_recvm()
740 rx_desc->in_use = false; in isert_post_recvm()
753 isert_post_recv(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc) in isert_post_recv() argument
758 if (!rx_desc->in_use) { in isert_post_recv()
766 rx_desc->in_use = false; in isert_post_recv()
767 rx_wr.wr_cqe = &rx_desc->rx_cqe; in isert_post_recv()
768 rx_wr.sg_list = &rx_desc->rx_sg; in isert_post_recv()
979 struct iser_rx_desc *rx_desc = isert_conn->login_desc; in isert_rx_login_req() local
991 (struct iscsi_login_req *)isert_get_iscsi_hdr(rx_desc); in isert_rx_login_req()
1009 memcpy(&login->req[0], isert_get_iscsi_hdr(rx_desc), ISCSI_HDR_LEN); in isert_rx_login_req()
1015 memcpy(login->req_buf, isert_get_data(rx_desc), size); in isert_rx_login_req()
1025 *isert_allocate_cmd(struct iscsit_conn *conn, struct iser_rx_desc *rx_desc) in isert_allocate_cmd() argument
1039 isert_cmd->rx_desc = rx_desc; in isert_allocate_cmd()
1047 struct iser_rx_desc *rx_desc, unsigned char *buf) in isert_handle_scsi_cmd() argument
1080 isert_get_data(rx_desc), imm_data_len); in isert_handle_scsi_cmd()
1087 sg_set_buf(&isert_cmd->sg, isert_get_data(rx_desc), in isert_handle_scsi_cmd()
1115 struct iser_rx_desc *rx_desc, unsigned char *buf) in isert_handle_iscsi_dataout() argument
1157 sg_nents, isert_get_data(rx_desc), unsol_data_len); in isert_handle_iscsi_dataout()
1159 sg_copy_from_buffer(sg_start, sg_nents, isert_get_data(rx_desc), in isert_handle_iscsi_dataout()
1170 return isert_post_recv(isert_conn, rx_desc); in isert_handle_iscsi_dataout()
1175 struct iscsit_cmd *cmd, struct iser_rx_desc *rx_desc, in isert_handle_nop_out() argument
1194 struct iscsit_cmd *cmd, struct iser_rx_desc *rx_desc, in isert_handle_text_cmd() argument
1213 memcpy(cmd->text_in_ptr, isert_get_data(rx_desc), payload_length); in isert_handle_text_cmd()
1219 isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc, in isert_rx_opcode() argument
1223 struct iscsi_hdr *hdr = isert_get_iscsi_hdr(rx_desc); in isert_rx_opcode()
1239 cmd = isert_allocate_cmd(conn, rx_desc); in isert_rx_opcode()
1251 rx_desc, (unsigned char *)hdr); in isert_rx_opcode()
1254 cmd = isert_allocate_cmd(conn, rx_desc); in isert_rx_opcode()
1260 rx_desc, (unsigned char *)hdr); in isert_rx_opcode()
1263 ret = isert_handle_iscsi_dataout(isert_conn, rx_desc, in isert_rx_opcode()
1267 cmd = isert_allocate_cmd(conn, rx_desc); in isert_rx_opcode()
1275 cmd = isert_allocate_cmd(conn, rx_desc); in isert_rx_opcode()
1285 cmd = isert_allocate_cmd(conn, rx_desc); in isert_rx_opcode()
1292 rx_desc, (struct iscsi_text *)hdr); in isert_rx_opcode()
1320 struct iser_rx_desc *rx_desc = cqe_to_rx_desc(wc->wr_cqe); in isert_recv_done() local
1321 struct iscsi_hdr *hdr = isert_get_iscsi_hdr(rx_desc); in isert_recv_done()
1322 struct iser_ctrl *iser_ctrl = isert_get_iser_hdr(rx_desc); in isert_recv_done()
1333 rx_desc->in_use = true; in isert_recv_done()
1335 ib_dma_sync_single_for_cpu(ib_dev, rx_desc->dma_addr, in isert_recv_done()
1339 rx_desc->dma_addr, hdr->opcode, hdr->itt, hdr->flags, in isert_recv_done()
1367 isert_rx_opcode(isert_conn, rx_desc, in isert_recv_done()
1370 ib_dma_sync_single_for_device(ib_dev, rx_desc->dma_addr, in isert_recv_done()
1746 ret = isert_post_recv(isert_conn, isert_cmd->rx_desc); in isert_post_response()
2119 rc = isert_post_recv(isert_conn, isert_cmd->rx_desc); in isert_put_datain()