Lines Matching refs:txn
341 struct qmi_txn txn;
344 rc = qmi_txn_init(ctrl->qmi.handle, &txn,
351 rc = qmi_send_request(ctrl->qmi.handle, NULL, &txn,
357 qmi_txn_cancel(&txn);
361 rc = qmi_txn_wait(&txn, SLIMBUS_QMI_RESP_TOUT);
378 struct qmi_txn *txn, const void *data)
387 complete(&txn->completion);
394 struct qmi_txn txn;
397 rc = qmi_txn_init(ctrl->qmi.handle, &txn,
400 rc = qmi_send_request(ctrl->qmi.handle, NULL, &txn,
406 qmi_txn_cancel(&txn);
410 rc = qmi_txn_wait(&txn, SLIMBUS_QMI_RESP_TOUT);
771 struct slim_msg_txn *txn)
781 u8 la = txn->la;
784 if (txn->mt == SLIM_MSG_MT_CORE &&
785 (txn->mc >= SLIM_MSG_MC_BEGIN_RECONFIGURATION &&
786 txn->mc <= SLIM_MSG_MC_RECONFIGURE_NOW))
789 if (txn->dt == SLIM_MSG_DEST_ENUMADDR)
792 if (txn->msg->num_bytes > SLIM_MSGQ_BUF_LEN ||
793 txn->rl > SLIM_MSGQ_BUF_LEN) {
798 pbuf = qcom_slim_ngd_tx_msg_get(ctrl, txn->rl, &tx_sent);
804 if (txn->mt == SLIM_MSG_MT_CORE &&
805 (txn->mc == SLIM_MSG_MC_CONNECT_SOURCE ||
806 txn->mc == SLIM_MSG_MC_CONNECT_SINK ||
807 txn->mc == SLIM_MSG_MC_DISCONNECT_PORT)) {
808 txn->mt = SLIM_MSG_MT_DEST_REFERRED_USER;
809 switch (txn->mc) {
811 txn->mc = SLIM_USR_MC_CONNECT_SRC;
814 txn->mc = SLIM_USR_MC_CONNECT_SINK;
817 txn->mc = SLIM_USR_MC_DISCONNECT_PORT;
825 wbuf[i++] = txn->la;
827 wbuf[i++] = txn->msg->wbuf[0];
828 if (txn->mc != SLIM_USR_MC_DISCONNECT_PORT)
829 wbuf[i++] = txn->msg->wbuf[1];
831 txn->comp = &done;
832 ret = slim_alloc_txn_tid(sctrl, txn);
838 wbuf[i++] = txn->tid;
840 txn->msg->num_bytes = i;
841 txn->msg->wbuf = wbuf;
842 txn->msg->rbuf = rbuf;
843 txn->rl = txn->msg->num_bytes + 4;
847 txn->rl--;
850 if (txn->dt == SLIM_MSG_DEST_LOGICALADDR) {
851 *pbuf = SLIM_MSG_ASM_FIRST_WORD(txn->rl, txn->mt, txn->mc, 0,
855 *pbuf = SLIM_MSG_ASM_FIRST_WORD(txn->rl, txn->mt, txn->mc, 1,
860 if (slim_tid_txn(txn->mt, txn->mc))
861 *(puc++) = txn->tid;
863 if (slim_ec_txn(txn->mt, txn->mc)) {
864 *(puc++) = (txn->ec & 0xFF);
865 *(puc++) = (txn->ec >> 8) & 0xFF;
868 if (txn->msg && txn->msg->wbuf)
869 memcpy(puc, txn->msg->wbuf, txn->msg->num_bytes);
871 ret = qcom_slim_ngd_tx_msg_post(ctrl, pbuf, txn->rl);
877 dev_err(sctrl->dev, "TX timed out:MC:0x%x,mt:0x%x", txn->mc,
878 txn->mt);
886 txn->mc, txn->mt);
895 struct slim_msg_txn *txn)
902 txn->comp = &done;
904 ret = qcom_slim_ngd_xfer_msg(ctrl, txn);
910 dev_err(ctrl->dev, "TX timed out:MC:0x%x,mt:0x%x", txn->mc,
911 txn->mt);
924 struct slim_msg_txn txn = {0,};
927 txn.mt = SLIM_MSG_MT_DEST_REFERRED_USER;
928 txn.dt = SLIM_MSG_DEST_LOGICALADDR;
929 txn.la = SLIM_LA_MGR;
930 txn.ec = 0;
931 txn.msg = &msg;
932 txn.msg->num_bytes = 0;
933 txn.msg->wbuf = wbuf;
934 txn.msg->rbuf = rbuf;
939 if (txn.msg->num_bytes == 0) {
943 wbuf[txn.msg->num_bytes++] = sdev->laddr;
944 wbuf[txn.msg->num_bytes] = rt->bps >> 2 |
950 wbuf[txn.msg->num_bytes] |= BIT(5);
952 txn.msg->num_bytes++;
953 wbuf[txn.msg->num_bytes++] = exp << 4 | rt->prot;
956 wbuf[txn.msg->num_bytes++] =
960 wbuf[txn.msg->num_bytes++] = port->ch.prrate;
962 ret = slim_alloc_txn_tid(ctrl, &txn);
967 wbuf[txn.msg->num_bytes++] = txn.tid;
969 wbuf[txn.msg->num_bytes++] = port->ch.id;
972 txn.mc = SLIM_USR_MC_DEF_ACT_CHAN;
973 txn.rl = txn.msg->num_bytes + 4;
974 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn);
976 slim_free_txn_tid(ctrl, &txn);
977 dev_err(&sdev->dev, "TX timed out:MC:0x%x,mt:0x%x", txn.mc,
978 txn.mt);
982 txn.mc = SLIM_USR_MC_RECONFIG_NOW;
983 txn.msg->num_bytes = 2;
985 txn.rl = txn.msg->num_bytes + 4;
987 ret = slim_alloc_txn_tid(ctrl, &txn);
993 wbuf[0] = txn.tid;
994 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn);
996 slim_free_txn_tid(ctrl, &txn);
997 dev_err(&sdev->dev, "TX timed out:MC:0x%x,mt:0x%x", txn.mc,
998 txn.mt);
1009 struct slim_msg_txn txn;
1014 txn.mt = SLIM_MSG_MT_DEST_REFERRED_USER;
1015 txn.dt = SLIM_MSG_DEST_LOGICALADDR;
1016 txn.la = SLIM_LA_MGR;
1017 txn.ec = 0;
1019 txn.mc = SLIM_USR_MC_ADDR_QUERY;
1020 txn.rl = 11;
1021 txn.msg = &msg;
1022 txn.msg->num_bytes = 7;
1023 txn.msg->wbuf = wbuf;
1024 txn.msg->rbuf = rbuf;
1026 ret = slim_alloc_txn_tid(ctrl, &txn);
1030 wbuf[0] = (u8)txn.tid;
1033 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn);
1035 slim_free_txn_tid(ctrl, &txn);
1158 struct slim_msg_txn txn;
1165 txn.dt = SLIM_MSG_DEST_LOGICALADDR;
1166 txn.ec = 0;
1167 txn.mc = SLIM_USR_MC_REPORT_SATELLITE;
1168 txn.mt = SLIM_MSG_MT_SRC_REFERRED_USER;
1169 txn.la = SLIM_LA_MGR;
1174 txn.msg = &msg;
1175 txn.msg->wbuf = wbuf;
1176 txn.msg->num_bytes = 4;
1177 txn.rl = 8;
1182 ret = qcom_slim_ngd_xfer_msg(&ctrl->ctrl, &txn);