Lines Matching defs:txn

26 	struct slim_msg_txn *txn;
31 txn = idr_find(&ctrl->tid_idr, tid);
34 if (txn == NULL)
37 msg = txn->msg;
44 slim_free_txn_tid(ctrl, txn);
46 if (txn->comp)
47 complete(txn->comp);
49 /* Remove runtime-pm vote now that response was received for TID txn */
56 * slim_alloc_txn_tid() - Allocate a tid to txn
59 * @txn: transaction to be allocated with tid.
61 * Return: zero on success with valid txn->tid and error code on failures.
63 int slim_alloc_txn_tid(struct slim_controller *ctrl, struct slim_msg_txn *txn)
69 ret = idr_alloc_cyclic(&ctrl->tid_idr, txn, 1,
75 txn->tid = ret;
82 * slim_free_txn_tid() - Free tid of txn
85 * @txn: transaction whose tid should be freed
87 void slim_free_txn_tid(struct slim_controller *ctrl, struct slim_msg_txn *txn)
92 idr_remove(&ctrl->tid_idr, txn->tid);
101 * @txn: Transaction to be sent over SLIMbus
110 int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn)
121 (txn->mt == SLIM_MSG_MT_CORE &&
122 txn->mc >= SLIM_MSG_MC_BEGIN_RECONFIGURATION &&
123 txn->mc <= SLIM_MSG_MC_RECONFIGURE_NOW))
135 txn->tid = 0;
136 need_tid = slim_tid_txn(txn->mt, txn->mc);
139 ret = slim_alloc_txn_tid(ctrl, txn);
143 if (!txn->msg->comp)
144 txn->comp = &done;
146 txn->comp = txn->comp;
149 ret = ctrl->xfer_msg(ctrl, txn);
151 if (!ret && need_tid && !txn->msg->comp) {
152 unsigned long ms = txn->rl + HZ;
154 timeout = wait_for_completion_timeout(txn->comp,
158 slim_free_txn_tid(ctrl, txn);
164 txn->mt, txn->mc, txn->la, ret);
167 if (!clk_pause_msg && (txn->tid == 0 || ret == -ETIMEDOUT)) {
237 struct slim_msg_txn *txn = &txn_stack;
254 txn->ec = ((sl | (1 << 3)) | ((msg->start_offset & 0xFFF) << 4));
261 txn->rl += msg->num_bytes;
267 if (slim_tid_txn(txn->mt, txn->mc))
268 txn->rl++;
270 return slim_do_transfer(ctrl, txn);