Lines Matching refs:tx
1004 struct ipath_verbs_txreq *tx = NULL; in get_txreq() local
1012 tx = list_entry(l, struct ipath_verbs_txreq, txreq.list); in get_txreq()
1015 return tx; in get_txreq()
1019 struct ipath_verbs_txreq *tx) in put_txreq() argument
1024 list_add(&tx->txreq.list, &dev->txreq_free); in put_txreq()
1030 struct ipath_verbs_txreq *tx = cookie; in sdma_complete() local
1031 struct ipath_qp *qp = tx->qp; in sdma_complete()
1039 if (tx->wqe) in sdma_complete()
1040 ipath_send_complete(qp, tx->wqe, ibs); in sdma_complete()
1047 } else if (tx->wqe) { in sdma_complete()
1049 ipath_send_complete(qp, tx->wqe, ibs); in sdma_complete()
1053 if (tx->txreq.flags & IPATH_SDMA_TXREQ_F_FREEBUF) in sdma_complete()
1054 kfree(tx->txreq.map_addr); in sdma_complete()
1055 put_txreq(dev, tx); in sdma_complete()
1104 struct ipath_verbs_txreq *tx; in ipath_verbs_send_dma() local
1110 tx = qp->s_tx; in ipath_verbs_send_dma()
1111 if (tx) { in ipath_verbs_send_dma()
1115 ret = ipath_sdma_verbs_send(dd, tx->ss, tx->len, tx); in ipath_verbs_send_dma()
1117 qp->s_tx = tx; in ipath_verbs_send_dma()
1123 tx = get_txreq(dev); in ipath_verbs_send_dma()
1124 if (!tx) { in ipath_verbs_send_dma()
1137 tx->qp = qp; in ipath_verbs_send_dma()
1139 tx->wqe = qp->s_wqe; in ipath_verbs_send_dma()
1140 tx->txreq.callback = sdma_complete; in ipath_verbs_send_dma()
1141 tx->txreq.callback_cookie = tx; in ipath_verbs_send_dma()
1142 tx->txreq.flags = IPATH_SDMA_TXREQ_F_HEADTOHOST | in ipath_verbs_send_dma()
1145 tx->txreq.flags |= IPATH_SDMA_TXREQ_F_USELARGEBUF; in ipath_verbs_send_dma()
1150 tx->txreq.flags |= IPATH_SDMA_TXREQ_F_VL15; in ipath_verbs_send_dma()
1164 tx->hdr.pbc[0] = cpu_to_le32(plen); in ipath_verbs_send_dma()
1165 tx->hdr.pbc[1] = cpu_to_le32(control); in ipath_verbs_send_dma()
1166 memcpy(&tx->hdr.hdr, hdr, hdrwords << 2); in ipath_verbs_send_dma()
1167 tx->txreq.sg_count = ndesc; in ipath_verbs_send_dma()
1168 tx->map_len = (hdrwords + 2) << 2; in ipath_verbs_send_dma()
1169 tx->txreq.map_addr = &tx->hdr; in ipath_verbs_send_dma()
1171 ret = ipath_sdma_verbs_send(dd, ss, dwords, tx); in ipath_verbs_send_dma()
1174 tx->ss = ss; in ipath_verbs_send_dma()
1175 tx->len = dwords; in ipath_verbs_send_dma()
1176 qp->s_tx = tx; in ipath_verbs_send_dma()
1183 tx->map_len = (plen + 1) << 2; in ipath_verbs_send_dma()
1184 piobuf = kmalloc(tx->map_len, GFP_ATOMIC); in ipath_verbs_send_dma()
1189 tx->txreq.map_addr = piobuf; in ipath_verbs_send_dma()
1190 tx->txreq.flags |= IPATH_SDMA_TXREQ_F_FREEBUF; in ipath_verbs_send_dma()
1191 tx->txreq.sg_count = 1; in ipath_verbs_send_dma()
1199 ret = ipath_sdma_verbs_send(dd, NULL, 0, tx); in ipath_verbs_send_dma()
1206 tx->ss = NULL; in ipath_verbs_send_dma()
1207 tx->len = 0; in ipath_verbs_send_dma()
1208 qp->s_tx = tx; in ipath_verbs_send_dma()
1217 put_txreq(dev, tx); in ipath_verbs_send_dma()
1993 struct ipath_verbs_txreq *tx; in ipath_register_ib_device() local
2006 tx = kmalloc(dd->ipath_sdma_descq_cnt * sizeof *tx, in ipath_register_ib_device()
2008 if (tx == NULL) { in ipath_register_ib_device()
2013 tx = NULL; in ipath_register_ib_device()
2014 idev->txreq_bufs = tx; in ipath_register_ib_device()
2088 for (i = 0; i < dd->ipath_sdma_descq_cnt; i++, tx++) in ipath_register_ib_device()
2089 list_add(&tx->txreq.list, &idev->txreq_free); in ipath_register_ib_device()