Lines Matching full:tx_desc
780 isert_login_post_send(struct isert_conn *isert_conn, struct iser_tx_desc *tx_desc) in isert_login_post_send() argument
786 ib_dma_sync_single_for_device(ib_dev, tx_desc->dma_addr, in isert_login_post_send()
789 tx_desc->tx_cqe.done = isert_login_send_done; in isert_login_post_send()
792 send_wr.wr_cqe = &tx_desc->tx_cqe; in isert_login_post_send()
793 send_wr.sg_list = tx_desc->tx_sg; in isert_login_post_send()
794 send_wr.num_sge = tx_desc->num_sge; in isert_login_post_send()
807 struct iser_tx_desc *tx_desc) in __isert_create_send_desc() argument
810 memset(&tx_desc->iser_header, 0, sizeof(struct iser_ctrl)); in __isert_create_send_desc()
811 tx_desc->iser_header.flags = ISCSI_CTRL; in __isert_create_send_desc()
813 tx_desc->num_sge = 1; in __isert_create_send_desc()
815 if (tx_desc->tx_sg[0].lkey != device->pd->local_dma_lkey) { in __isert_create_send_desc()
816 tx_desc->tx_sg[0].lkey = device->pd->local_dma_lkey; in __isert_create_send_desc()
817 isert_dbg("tx_desc %p lkey mismatch, fixing\n", tx_desc); in __isert_create_send_desc()
824 struct iser_tx_desc *tx_desc) in isert_create_send_desc() argument
829 ib_dma_sync_single_for_cpu(ib_dev, tx_desc->dma_addr, in isert_create_send_desc()
832 __isert_create_send_desc(device, tx_desc); in isert_create_send_desc()
837 struct iser_tx_desc *tx_desc) in isert_init_tx_hdrs() argument
843 dma_addr = ib_dma_map_single(ib_dev, (void *)tx_desc, in isert_init_tx_hdrs()
850 tx_desc->dma_addr = dma_addr; in isert_init_tx_hdrs()
851 tx_desc->tx_sg[0].addr = tx_desc->dma_addr; in isert_init_tx_hdrs()
852 tx_desc->tx_sg[0].length = ISER_HEADERS_LEN; in isert_init_tx_hdrs()
853 tx_desc->tx_sg[0].lkey = device->pd->local_dma_lkey; in isert_init_tx_hdrs()
856 tx_desc->tx_sg[0].addr, tx_desc->tx_sg[0].length, in isert_init_tx_hdrs()
857 tx_desc->tx_sg[0].lkey); in isert_init_tx_hdrs()
866 struct iser_tx_desc *tx_desc = &isert_cmd->tx_desc; in isert_init_send_wr() local
868 tx_desc->tx_cqe.done = isert_send_done; in isert_init_send_wr()
869 send_wr->wr_cqe = &tx_desc->tx_cqe; in isert_init_send_wr()
878 send_wr->sg_list = &tx_desc->tx_sg[0]; in isert_init_send_wr()
879 send_wr->num_sge = isert_cmd->tx_desc.num_sge; in isert_init_send_wr()
920 struct iser_tx_desc *tx_desc = &isert_conn->login_tx_desc; in isert_put_login_tx() local
923 __isert_create_send_desc(device, tx_desc); in isert_put_login_tx()
925 memcpy(&tx_desc->iscsi_header, &login->rsp[0], in isert_put_login_tx()
928 isert_init_tx_hdrs(isert_conn, tx_desc); in isert_put_login_tx()
931 struct ib_sge *tx_dsg = &tx_desc->tx_sg[1]; in isert_put_login_tx()
944 tx_desc->num_sge = 2; in isert_put_login_tx()
969 ret = isert_login_post_send(isert_conn, tx_desc); in isert_put_login_tx()
1474 hdr = (struct iscsi_text_rsp *)&isert_cmd->tx_desc.iscsi_header; in isert_put_cmd()
1503 isert_unmap_tx_desc(struct iser_tx_desc *tx_desc, struct ib_device *ib_dev) in isert_unmap_tx_desc() argument
1505 if (tx_desc->dma_addr != 0) { in isert_unmap_tx_desc()
1506 isert_dbg("unmap single for tx_desc->dma_addr\n"); in isert_unmap_tx_desc()
1507 ib_dma_unmap_single(ib_dev, tx_desc->dma_addr, in isert_unmap_tx_desc()
1509 tx_desc->dma_addr = 0; in isert_unmap_tx_desc()
1514 isert_completion_put(struct iser_tx_desc *tx_desc, struct isert_cmd *isert_cmd, in isert_completion_put() argument
1524 isert_unmap_tx_desc(tx_desc, ib_dev); in isert_completion_put()
1677 isert_completion_put(&isert_cmd->tx_desc, isert_cmd, in isert_do_control_comp()
1695 struct iser_tx_desc *tx_desc = cqe_to_tx_desc(wc->wr_cqe); in isert_login_send_done() local
1703 isert_unmap_tx_desc(tx_desc, ib_dev); in isert_login_send_done()
1711 struct iser_tx_desc *tx_desc = cqe_to_tx_desc(wc->wr_cqe); in isert_send_done() local
1712 struct isert_cmd *isert_cmd = tx_desc_to_cmd(tx_desc); in isert_send_done()
1718 isert_completion_put(tx_desc, isert_cmd, ib_dev, true); in isert_send_done()
1729 isert_unmap_tx_desc(tx_desc, ib_dev); in isert_send_done()
1736 isert_completion_put(tx_desc, isert_cmd, ib_dev, false); in isert_send_done()
1750 ret = ib_post_send(isert_conn->qp, &isert_cmd->tx_desc.send_wr, NULL); in isert_post_response()
1763 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_response()
1765 &isert_cmd->tx_desc.iscsi_header; in isert_put_response()
1767 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_response()
1769 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_response()
1778 struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; in isert_put_response()
1799 isert_cmd->tx_desc.num_sge = 2; in isert_put_response()
1851 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_nopin()
1853 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_nopin()
1855 &isert_cmd->tx_desc.iscsi_header, in isert_put_nopin()
1857 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_nopin()
1870 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_logout_rsp()
1872 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_logout_rsp()
1874 &isert_cmd->tx_desc.iscsi_header); in isert_put_logout_rsp()
1875 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_logout_rsp()
1888 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_tm_rsp()
1890 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_tm_rsp()
1892 &isert_cmd->tx_desc.iscsi_header); in isert_put_tm_rsp()
1893 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_tm_rsp()
1906 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_reject()
1909 struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; in isert_put_reject()
1911 (struct iscsi_reject *)&isert_cmd->tx_desc.iscsi_header; in isert_put_reject()
1913 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_reject()
1915 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_reject()
1927 isert_cmd->tx_desc.num_sge = 2; in isert_put_reject()
1941 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_text_rsp()
1943 (struct iscsi_text_rsp *)&isert_cmd->tx_desc.iscsi_header; in isert_put_text_rsp()
1947 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_text_rsp()
1953 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_text_rsp()
1958 struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; in isert_put_text_rsp()
1970 isert_cmd->tx_desc.num_sge = 2; in isert_put_text_rsp()
2105 isert_cmd->tx_desc.tx_cqe.done = isert_rdma_write_done; in isert_put_datain()
2106 cqe = &isert_cmd->tx_desc.tx_cqe; in isert_put_datain()
2109 * Build isert_conn->tx_desc for iSCSI response PDU and attach in isert_put_datain()
2112 &isert_cmd->tx_desc); in isert_put_datain()
2114 &isert_cmd->tx_desc.iscsi_header); in isert_put_datain()
2115 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_datain()
2117 &isert_cmd->tx_desc.send_wr); in isert_put_datain()
2123 chain_wr = &isert_cmd->tx_desc.send_wr; in isert_put_datain()
2141 isert_cmd->tx_desc.tx_cqe.done = isert_rdma_read_done; in isert_get_dataout()
2143 &isert_cmd->tx_desc.tx_cqe, NULL); in isert_get_dataout()