Lines Matching refs:tx

440 	struct sdma_txreq *tx,
499 struct sdma_txreq *tx, in sdma_txinit_ahg() argument
512 tx->desc_limit = ARRAY_SIZE(tx->descs); in sdma_txinit_ahg()
513 tx->descp = &tx->descs[0]; in sdma_txinit_ahg()
514 INIT_LIST_HEAD(&tx->list); in sdma_txinit_ahg()
515 tx->num_desc = 0; in sdma_txinit_ahg()
516 tx->flags = flags; in sdma_txinit_ahg()
517 tx->complete = cb; in sdma_txinit_ahg()
518 tx->coalesce_buf = NULL; in sdma_txinit_ahg()
519 tx->wait = NULL; in sdma_txinit_ahg()
520 tx->packet_len = tlen; in sdma_txinit_ahg()
521 tx->tlen = tx->packet_len; in sdma_txinit_ahg()
522 tx->descs[0].qw[0] = SDMA_DESC0_FIRST_DESC_FLAG; in sdma_txinit_ahg()
523 tx->descs[0].qw[1] = 0; in sdma_txinit_ahg()
525 tx->descs[0].qw[1] |= in sdma_txinit_ahg()
531 _sdma_txreq_ahgadd(tx, num_ahg, ahg_entry, ahg, ahg_hlen); in sdma_txinit_ahg()
567 struct sdma_txreq *tx, in sdma_txinit() argument
572 return sdma_txinit_ahg(tx, flags, tlen, 0, 0, NULL, 0, cb); in sdma_txinit()
595 struct sdma_txreq *tx, in make_tx_sdma_desc() argument
603 struct sdma_desc *desc = &tx->descp[tx->num_desc]; in make_tx_sdma_desc()
605 if (!tx->num_desc) { in make_tx_sdma_desc()
626 int ext_coal_sdma_tx_descs(struct hfi1_devdata *dd, struct sdma_txreq *tx,
632 static inline void sdma_txclean(struct hfi1_devdata *dd, struct sdma_txreq *tx) in sdma_txclean() argument
634 if (tx->num_desc) in sdma_txclean()
635 __sdma_txclean(dd, tx); in sdma_txclean()
640 struct sdma_txreq *tx) in _sdma_close_tx() argument
642 u16 last_desc = tx->num_desc - 1; in _sdma_close_tx()
644 tx->descp[last_desc].qw[0] |= SDMA_DESC0_LAST_DESC_FLAG; in _sdma_close_tx()
645 tx->descp[last_desc].qw[1] |= dd->default_desc1; in _sdma_close_tx()
646 if (tx->flags & SDMA_TXREQ_F_URGENT) in _sdma_close_tx()
647 tx->descp[last_desc].qw[1] |= (SDMA_DESC1_HEAD_TO_HOST_FLAG | in _sdma_close_tx()
654 struct sdma_txreq *tx, in _sdma_txadd_daddr() argument
664 tx, in _sdma_txadd_daddr()
668 WARN_ON(len > tx->tlen); in _sdma_txadd_daddr()
669 tx->num_desc++; in _sdma_txadd_daddr()
670 tx->tlen -= len; in _sdma_txadd_daddr()
672 if (!tx->tlen) { in _sdma_txadd_daddr()
673 if (tx->packet_len & (sizeof(u32) - 1)) { in _sdma_txadd_daddr()
674 rval = _pad_sdma_tx_descs(dd, tx); in _sdma_txadd_daddr()
678 _sdma_close_tx(dd, tx); in _sdma_txadd_daddr()
710 struct sdma_txreq *tx, in sdma_txadd_page() argument
721 if ((unlikely(tx->num_desc == tx->desc_limit))) { in sdma_txadd_page()
722 rval = ext_coal_sdma_tx_descs(dd, tx, SDMA_MAP_PAGE, in sdma_txadd_page()
736 __sdma_txclean(dd, tx); in sdma_txadd_page()
740 return _sdma_txadd_daddr(dd, SDMA_MAP_PAGE, tx, addr, len, in sdma_txadd_page()
762 struct sdma_txreq *tx, in sdma_txadd_daddr() argument
768 if ((unlikely(tx->num_desc == tx->desc_limit))) { in sdma_txadd_daddr()
769 rval = ext_coal_sdma_tx_descs(dd, tx, SDMA_MAP_NONE, in sdma_txadd_daddr()
775 return _sdma_txadd_daddr(dd, SDMA_MAP_NONE, tx, addr, len, in sdma_txadd_daddr()
797 struct sdma_txreq *tx, in sdma_txadd_kvaddr() argument
804 if ((unlikely(tx->num_desc == tx->desc_limit))) { in sdma_txadd_kvaddr()
805 rval = ext_coal_sdma_tx_descs(dd, tx, SDMA_MAP_SINGLE, in sdma_txadd_kvaddr()
818 __sdma_txclean(dd, tx); in sdma_txadd_kvaddr()
822 return _sdma_txadd_daddr(dd, SDMA_MAP_SINGLE, tx, addr, len, in sdma_txadd_kvaddr()
830 struct sdma_txreq *tx,
881 struct sdma_txreq *tx) in sdma_progress() argument
885 if (tx->num_desc > sde->desc_avail) in sdma_progress()