Lines Matching full:tx_desc
783 isert_login_post_send(struct isert_conn *isert_conn, struct iser_tx_desc *tx_desc) in isert_login_post_send() argument
789 ib_dma_sync_single_for_device(ib_dev, tx_desc->dma_addr, in isert_login_post_send()
792 tx_desc->tx_cqe.done = isert_login_send_done; in isert_login_post_send()
795 send_wr.wr_cqe = &tx_desc->tx_cqe; in isert_login_post_send()
796 send_wr.sg_list = tx_desc->tx_sg; in isert_login_post_send()
797 send_wr.num_sge = tx_desc->num_sge; in isert_login_post_send()
810 struct iser_tx_desc *tx_desc) in __isert_create_send_desc() argument
813 memset(&tx_desc->iser_header, 0, sizeof(struct iser_ctrl)); in __isert_create_send_desc()
814 tx_desc->iser_header.flags = ISCSI_CTRL; in __isert_create_send_desc()
816 tx_desc->num_sge = 1; in __isert_create_send_desc()
818 if (tx_desc->tx_sg[0].lkey != device->pd->local_dma_lkey) { in __isert_create_send_desc()
819 tx_desc->tx_sg[0].lkey = device->pd->local_dma_lkey; in __isert_create_send_desc()
820 isert_dbg("tx_desc %p lkey mismatch, fixing\n", tx_desc); in __isert_create_send_desc()
827 struct iser_tx_desc *tx_desc) in isert_create_send_desc() argument
832 ib_dma_sync_single_for_cpu(ib_dev, tx_desc->dma_addr, in isert_create_send_desc()
835 __isert_create_send_desc(device, tx_desc); in isert_create_send_desc()
840 struct iser_tx_desc *tx_desc) in isert_init_tx_hdrs() argument
846 dma_addr = ib_dma_map_single(ib_dev, (void *)tx_desc, in isert_init_tx_hdrs()
853 tx_desc->dma_addr = dma_addr; in isert_init_tx_hdrs()
854 tx_desc->tx_sg[0].addr = tx_desc->dma_addr; in isert_init_tx_hdrs()
855 tx_desc->tx_sg[0].length = ISER_HEADERS_LEN; in isert_init_tx_hdrs()
856 tx_desc->tx_sg[0].lkey = device->pd->local_dma_lkey; in isert_init_tx_hdrs()
859 tx_desc->tx_sg[0].addr, tx_desc->tx_sg[0].length, in isert_init_tx_hdrs()
860 tx_desc->tx_sg[0].lkey); in isert_init_tx_hdrs()
869 struct iser_tx_desc *tx_desc = &isert_cmd->tx_desc; in isert_init_send_wr() local
871 tx_desc->tx_cqe.done = isert_send_done; in isert_init_send_wr()
872 send_wr->wr_cqe = &tx_desc->tx_cqe; in isert_init_send_wr()
881 send_wr->sg_list = &tx_desc->tx_sg[0]; in isert_init_send_wr()
882 send_wr->num_sge = isert_cmd->tx_desc.num_sge; in isert_init_send_wr()
923 struct iser_tx_desc *tx_desc = &isert_conn->login_tx_desc; in isert_put_login_tx() local
926 __isert_create_send_desc(device, tx_desc); in isert_put_login_tx()
928 memcpy(&tx_desc->iscsi_header, &login->rsp[0], in isert_put_login_tx()
931 isert_init_tx_hdrs(isert_conn, tx_desc); in isert_put_login_tx()
934 struct ib_sge *tx_dsg = &tx_desc->tx_sg[1]; in isert_put_login_tx()
947 tx_desc->num_sge = 2; in isert_put_login_tx()
972 ret = isert_login_post_send(isert_conn, tx_desc); in isert_put_login_tx()
1477 hdr = (struct iscsi_text_rsp *)&isert_cmd->tx_desc.iscsi_header; in isert_put_cmd()
1506 isert_unmap_tx_desc(struct iser_tx_desc *tx_desc, struct ib_device *ib_dev) in isert_unmap_tx_desc() argument
1508 if (tx_desc->dma_addr != 0) { in isert_unmap_tx_desc()
1509 isert_dbg("unmap single for tx_desc->dma_addr\n"); in isert_unmap_tx_desc()
1510 ib_dma_unmap_single(ib_dev, tx_desc->dma_addr, in isert_unmap_tx_desc()
1512 tx_desc->dma_addr = 0; in isert_unmap_tx_desc()
1517 isert_completion_put(struct iser_tx_desc *tx_desc, struct isert_cmd *isert_cmd, in isert_completion_put() argument
1527 isert_unmap_tx_desc(tx_desc, ib_dev); in isert_completion_put()
1680 isert_completion_put(&isert_cmd->tx_desc, isert_cmd, in isert_do_control_comp()
1698 struct iser_tx_desc *tx_desc = cqe_to_tx_desc(wc->wr_cqe); in isert_login_send_done() local
1706 isert_unmap_tx_desc(tx_desc, ib_dev); in isert_login_send_done()
1714 struct iser_tx_desc *tx_desc = cqe_to_tx_desc(wc->wr_cqe); in isert_send_done() local
1715 struct isert_cmd *isert_cmd = tx_desc_to_cmd(tx_desc); in isert_send_done()
1721 isert_completion_put(tx_desc, isert_cmd, ib_dev, true); in isert_send_done()
1732 isert_unmap_tx_desc(tx_desc, ib_dev); in isert_send_done()
1739 isert_completion_put(tx_desc, isert_cmd, ib_dev, false); in isert_send_done()
1753 ret = ib_post_send(isert_conn->qp, &isert_cmd->tx_desc.send_wr, NULL); in isert_post_response()
1766 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_response()
1768 &isert_cmd->tx_desc.iscsi_header; in isert_put_response()
1770 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_response()
1772 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_response()
1781 struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; in isert_put_response()
1802 isert_cmd->tx_desc.num_sge = 2; in isert_put_response()
1854 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_nopin()
1856 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_nopin()
1858 &isert_cmd->tx_desc.iscsi_header, in isert_put_nopin()
1860 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_nopin()
1873 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_logout_rsp()
1875 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_logout_rsp()
1877 &isert_cmd->tx_desc.iscsi_header); in isert_put_logout_rsp()
1878 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_logout_rsp()
1891 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_tm_rsp()
1893 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_tm_rsp()
1895 &isert_cmd->tx_desc.iscsi_header); in isert_put_tm_rsp()
1896 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_tm_rsp()
1909 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_reject()
1912 struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; in isert_put_reject()
1914 (struct iscsi_reject *)&isert_cmd->tx_desc.iscsi_header; in isert_put_reject()
1916 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_reject()
1918 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_reject()
1930 isert_cmd->tx_desc.num_sge = 2; in isert_put_reject()
1944 struct ib_send_wr *send_wr = &isert_cmd->tx_desc.send_wr; in isert_put_text_rsp()
1946 (struct iscsi_text_rsp *)&isert_cmd->tx_desc.iscsi_header; in isert_put_text_rsp()
1950 isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc); in isert_put_text_rsp()
1956 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_text_rsp()
1961 struct ib_sge *tx_dsg = &isert_cmd->tx_desc.tx_sg[1]; in isert_put_text_rsp()
1973 isert_cmd->tx_desc.num_sge = 2; in isert_put_text_rsp()
2108 isert_cmd->tx_desc.tx_cqe.done = isert_rdma_write_done; in isert_put_datain()
2109 cqe = &isert_cmd->tx_desc.tx_cqe; in isert_put_datain()
2112 * Build isert_conn->tx_desc for iSCSI response PDU and attach in isert_put_datain()
2115 &isert_cmd->tx_desc); in isert_put_datain()
2117 &isert_cmd->tx_desc.iscsi_header); in isert_put_datain()
2118 isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc); in isert_put_datain()
2120 &isert_cmd->tx_desc.send_wr); in isert_put_datain()
2126 chain_wr = &isert_cmd->tx_desc.send_wr; in isert_put_datain()
2144 isert_cmd->tx_desc.tx_cqe.done = isert_rdma_read_done; in isert_get_dataout()
2146 &isert_cmd->tx_desc.tx_cqe, NULL); in isert_get_dataout()