Lines Matching refs:txn
352 struct qmi_txn txn;
355 rc = qmi_txn_init(ctrl->qmi.handle, &txn,
362 rc = qmi_send_request(ctrl->qmi.handle, NULL, &txn,
368 qmi_txn_cancel(&txn);
372 rc = qmi_txn_wait(&txn, SLIMBUS_QMI_RESP_TOUT);
389 struct qmi_txn *txn, const void *data)
398 complete(&txn->completion);
405 struct qmi_txn txn;
408 rc = qmi_txn_init(ctrl->qmi.handle, &txn,
411 rc = qmi_send_request(ctrl->qmi.handle, NULL, &txn,
417 qmi_txn_cancel(&txn);
421 rc = qmi_txn_wait(&txn, SLIMBUS_QMI_RESP_TOUT);
787 struct slim_msg_txn *txn)
797 u8 la = txn->la;
800 if (txn->mt == SLIM_MSG_MT_CORE &&
801 (txn->mc >= SLIM_MSG_MC_BEGIN_RECONFIGURATION &&
802 txn->mc <= SLIM_MSG_MC_RECONFIGURE_NOW))
805 if (txn->dt == SLIM_MSG_DEST_ENUMADDR)
808 if (txn->msg->num_bytes > SLIM_MSGQ_BUF_LEN ||
809 txn->rl > SLIM_MSGQ_BUF_LEN) {
814 pbuf = qcom_slim_ngd_tx_msg_get(ctrl, txn->rl, &tx_sent);
820 if (txn->mt == SLIM_MSG_MT_CORE &&
821 (txn->mc == SLIM_MSG_MC_CONNECT_SOURCE ||
822 txn->mc == SLIM_MSG_MC_CONNECT_SINK ||
823 txn->mc == SLIM_MSG_MC_DISCONNECT_PORT)) {
824 txn->mt = SLIM_MSG_MT_DEST_REFERRED_USER;
825 switch (txn->mc) {
827 txn->mc = SLIM_USR_MC_CONNECT_SRC;
830 txn->mc = SLIM_USR_MC_CONNECT_SINK;
833 txn->mc = SLIM_USR_MC_DISCONNECT_PORT;
841 wbuf[i++] = txn->la;
843 wbuf[i++] = txn->msg->wbuf[0];
844 if (txn->mc != SLIM_USR_MC_DISCONNECT_PORT)
845 wbuf[i++] = txn->msg->wbuf[1];
847 txn->comp = &done;
848 ret = slim_alloc_txn_tid(sctrl, txn);
854 wbuf[i++] = txn->tid;
856 txn->msg->num_bytes = i;
857 txn->msg->wbuf = wbuf;
858 txn->msg->rbuf = rbuf;
859 txn->rl = txn->msg->num_bytes + 4;
863 txn->rl--;
866 if (txn->dt == SLIM_MSG_DEST_LOGICALADDR) {
867 *pbuf = SLIM_MSG_ASM_FIRST_WORD(txn->rl, txn->mt, txn->mc, 0,
871 *pbuf = SLIM_MSG_ASM_FIRST_WORD(txn->rl, txn->mt, txn->mc, 1,
876 if (slim_tid_txn(txn->mt, txn->mc))
877 *(puc++) = txn->tid;
879 if (slim_ec_txn(txn->mt, txn->mc)) {
880 *(puc++) = (txn->ec & 0xFF);
881 *(puc++) = (txn->ec >> 8) & 0xFF;
884 if (txn->msg && txn->msg->wbuf)
885 memcpy(puc, txn->msg->wbuf, txn->msg->num_bytes);
888 ret = qcom_slim_ngd_tx_msg_post(ctrl, pbuf, txn->rl);
896 dev_err(sctrl->dev, "TX timed out:MC:0x%x,mt:0x%x", txn->mc,
897 txn->mt);
906 txn->mc, txn->mt);
917 struct slim_msg_txn *txn)
926 txn->comp = &done;
928 ret = qcom_slim_ngd_xfer_msg(ctrl, txn);
934 dev_err(ctrl->dev, "TX timed out:MC:0x%x,mt:0x%x", txn->mc,
935 txn->mt);
1002 struct slim_msg_txn txn = {0,};
1005 txn.mt = SLIM_MSG_MT_DEST_REFERRED_USER;
1006 txn.dt = SLIM_MSG_DEST_LOGICALADDR;
1007 txn.la = SLIM_LA_MGR;
1008 txn.ec = 0;
1009 txn.msg = &msg;
1010 txn.msg->num_bytes = 0;
1011 txn.msg->wbuf = wbuf;
1012 txn.msg->rbuf = rbuf;
1017 if (txn.msg->num_bytes == 0) {
1020 wbuf[txn.msg->num_bytes++] = sdev->laddr;
1021 wbuf[txn.msg->num_bytes] = rt->bps >> 2 |
1034 wbuf[txn.msg->num_bytes] |= BIT(5);
1036 txn.msg->num_bytes++;
1037 wbuf[txn.msg->num_bytes++] = exp << 4 | rt->prot;
1040 wbuf[txn.msg->num_bytes++] =
1044 wbuf[txn.msg->num_bytes++] = port->ch.prrate;
1046 ret = slim_alloc_txn_tid(ctrl, &txn);
1051 wbuf[txn.msg->num_bytes++] = txn.tid;
1053 wbuf[txn.msg->num_bytes++] = port->ch.id;
1056 txn.mc = SLIM_USR_MC_DEF_ACT_CHAN;
1057 txn.rl = txn.msg->num_bytes + 4;
1058 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn);
1060 slim_free_txn_tid(ctrl, &txn);
1061 dev_err(&sdev->dev, "TX timed out:MC:0x%x,mt:0x%x", txn.mc,
1062 txn.mt);
1066 txn.mc = SLIM_USR_MC_RECONFIG_NOW;
1067 txn.msg->num_bytes = 2;
1069 txn.rl = txn.msg->num_bytes + 4;
1071 ret = slim_alloc_txn_tid(ctrl, &txn);
1077 wbuf[0] = txn.tid;
1078 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn);
1080 slim_free_txn_tid(ctrl, &txn);
1081 dev_err(&sdev->dev, "TX timed out:MC:0x%x,mt:0x%x", txn.mc,
1082 txn.mt);
1093 struct slim_msg_txn txn;
1098 txn.mt = SLIM_MSG_MT_DEST_REFERRED_USER;
1099 txn.dt = SLIM_MSG_DEST_LOGICALADDR;
1100 txn.la = SLIM_LA_MGR;
1101 txn.ec = 0;
1103 txn.mc = SLIM_USR_MC_ADDR_QUERY;
1104 txn.rl = 11;
1105 txn.msg = &msg;
1106 txn.msg->num_bytes = 7;
1107 txn.msg->wbuf = wbuf;
1108 txn.msg->rbuf = rbuf;
1110 ret = slim_alloc_txn_tid(ctrl, &txn);
1114 wbuf[0] = (u8)txn.tid;
1117 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn);
1119 slim_free_txn_tid(ctrl, &txn);
1248 struct slim_msg_txn txn;
1255 txn.dt = SLIM_MSG_DEST_LOGICALADDR;
1256 txn.ec = 0;
1257 txn.mc = SLIM_USR_MC_REPORT_SATELLITE;
1258 txn.mt = SLIM_MSG_MT_SRC_REFERRED_USER;
1259 txn.la = SLIM_LA_MGR;
1264 txn.msg = &msg;
1265 txn.msg->wbuf = wbuf;
1266 txn.msg->num_bytes = 4;
1267 txn.rl = 8;
1272 ret = qcom_slim_ngd_xfer_msg(&ctrl->ctrl, &txn);