Lines Matching full:txn
351 struct qmi_txn txn; in qcom_slim_qmi_send_select_inst_req() local
354 rc = qmi_txn_init(ctrl->qmi.handle, &txn, in qcom_slim_qmi_send_select_inst_req()
357 dev_err(ctrl->dev, "QMI TXN init fail: %d\n", rc); in qcom_slim_qmi_send_select_inst_req()
361 rc = qmi_send_request(ctrl->qmi.handle, NULL, &txn, in qcom_slim_qmi_send_select_inst_req()
367 qmi_txn_cancel(&txn); in qcom_slim_qmi_send_select_inst_req()
371 rc = qmi_txn_wait(&txn, SLIMBUS_QMI_RESP_TOUT); in qcom_slim_qmi_send_select_inst_req()
373 dev_err(ctrl->dev, "QMI TXN wait fail: %d\n", rc); in qcom_slim_qmi_send_select_inst_req()
388 struct qmi_txn *txn, const void *data) in qcom_slim_qmi_power_resp_cb() argument
397 complete(&txn->completion); in qcom_slim_qmi_power_resp_cb()
404 struct qmi_txn txn; in qcom_slim_qmi_send_power_request() local
407 rc = qmi_txn_init(ctrl->qmi.handle, &txn, in qcom_slim_qmi_send_power_request()
410 rc = qmi_send_request(ctrl->qmi.handle, NULL, &txn, in qcom_slim_qmi_send_power_request()
416 qmi_txn_cancel(&txn); in qcom_slim_qmi_send_power_request()
420 rc = qmi_txn_wait(&txn, SLIMBUS_QMI_RESP_TOUT); in qcom_slim_qmi_send_power_request()
422 dev_err(ctrl->dev, "QMI TXN wait fail: %d\n", rc); in qcom_slim_qmi_send_power_request()
786 struct slim_msg_txn *txn) in qcom_slim_ngd_xfer_msg() argument
797 u8 la = txn->la; in qcom_slim_ngd_xfer_msg()
800 if (txn->mt == SLIM_MSG_MT_CORE && in qcom_slim_ngd_xfer_msg()
801 (txn->mc >= SLIM_MSG_MC_BEGIN_RECONFIGURATION && in qcom_slim_ngd_xfer_msg()
802 txn->mc <= SLIM_MSG_MC_RECONFIGURE_NOW)) in qcom_slim_ngd_xfer_msg()
805 if (txn->dt == SLIM_MSG_DEST_ENUMADDR) in qcom_slim_ngd_xfer_msg()
808 if (txn->msg->num_bytes > SLIM_MSGQ_BUF_LEN || in qcom_slim_ngd_xfer_msg()
809 txn->rl > SLIM_MSGQ_BUF_LEN) { in qcom_slim_ngd_xfer_msg()
814 pbuf = qcom_slim_ngd_tx_msg_get(ctrl, txn->rl, &tx_sent); in qcom_slim_ngd_xfer_msg()
820 if (txn->mt == SLIM_MSG_MT_CORE && in qcom_slim_ngd_xfer_msg()
821 (txn->mc == SLIM_MSG_MC_CONNECT_SOURCE || in qcom_slim_ngd_xfer_msg()
822 txn->mc == SLIM_MSG_MC_CONNECT_SINK || in qcom_slim_ngd_xfer_msg()
823 txn->mc == SLIM_MSG_MC_DISCONNECT_PORT)) { in qcom_slim_ngd_xfer_msg()
824 txn->mt = SLIM_MSG_MT_DEST_REFERRED_USER; in qcom_slim_ngd_xfer_msg()
825 switch (txn->mc) { in qcom_slim_ngd_xfer_msg()
827 txn->mc = SLIM_USR_MC_CONNECT_SRC; in qcom_slim_ngd_xfer_msg()
830 txn->mc = SLIM_USR_MC_CONNECT_SINK; in qcom_slim_ngd_xfer_msg()
833 txn->mc = SLIM_USR_MC_DISCONNECT_PORT; in qcom_slim_ngd_xfer_msg()
841 wbuf[i++] = txn->la; in qcom_slim_ngd_xfer_msg()
843 wbuf[i++] = txn->msg->wbuf[0]; in qcom_slim_ngd_xfer_msg()
844 if (txn->mc != SLIM_USR_MC_DISCONNECT_PORT) in qcom_slim_ngd_xfer_msg()
845 wbuf[i++] = txn->msg->wbuf[1]; in qcom_slim_ngd_xfer_msg()
847 txn->comp = &done; in qcom_slim_ngd_xfer_msg()
848 ret = slim_alloc_txn_tid(sctrl, txn); in qcom_slim_ngd_xfer_msg()
854 wbuf[i++] = txn->tid; in qcom_slim_ngd_xfer_msg()
856 txn->msg->num_bytes = i; in qcom_slim_ngd_xfer_msg()
857 txn->msg->wbuf = wbuf; in qcom_slim_ngd_xfer_msg()
858 txn->msg->rbuf = rbuf; in qcom_slim_ngd_xfer_msg()
859 txn->rl = txn->msg->num_bytes + 4; in qcom_slim_ngd_xfer_msg()
863 txn->rl--; in qcom_slim_ngd_xfer_msg()
866 if (txn->dt == SLIM_MSG_DEST_LOGICALADDR) { in qcom_slim_ngd_xfer_msg()
867 *pbuf = SLIM_MSG_ASM_FIRST_WORD(txn->rl, txn->mt, txn->mc, 0, in qcom_slim_ngd_xfer_msg()
871 *pbuf = SLIM_MSG_ASM_FIRST_WORD(txn->rl, txn->mt, txn->mc, 1, in qcom_slim_ngd_xfer_msg()
876 if (slim_tid_txn(txn->mt, txn->mc)) in qcom_slim_ngd_xfer_msg()
877 *(puc++) = txn->tid; in qcom_slim_ngd_xfer_msg()
879 if (slim_ec_txn(txn->mt, txn->mc)) { in qcom_slim_ngd_xfer_msg()
880 *(puc++) = (txn->ec & 0xFF); in qcom_slim_ngd_xfer_msg()
881 *(puc++) = (txn->ec >> 8) & 0xFF; in qcom_slim_ngd_xfer_msg()
884 if (txn->msg && txn->msg->wbuf) in qcom_slim_ngd_xfer_msg()
885 memcpy(puc, txn->msg->wbuf, txn->msg->num_bytes); in qcom_slim_ngd_xfer_msg()
888 ret = qcom_slim_ngd_tx_msg_post(ctrl, pbuf, txn->rl); in qcom_slim_ngd_xfer_msg()
896 dev_err(sctrl->dev, "TX timed out:MC:0x%x,mt:0x%x", txn->mc, in qcom_slim_ngd_xfer_msg()
897 txn->mt); in qcom_slim_ngd_xfer_msg()
906 txn->mc, txn->mt); in qcom_slim_ngd_xfer_msg()
917 struct slim_msg_txn *txn) in qcom_slim_ngd_xfer_msg_sync() argument
927 txn->comp = &done; in qcom_slim_ngd_xfer_msg_sync()
929 ret = qcom_slim_ngd_xfer_msg(ctrl, txn); in qcom_slim_ngd_xfer_msg_sync()
935 dev_err(ctrl->dev, "TX timed out:MC:0x%x,mt:0x%x", txn->mc, in qcom_slim_ngd_xfer_msg_sync()
936 txn->mt); in qcom_slim_ngd_xfer_msg_sync()
1003 struct slim_msg_txn txn = {0,}; in qcom_slim_ngd_enable_stream() local
1006 txn.mt = SLIM_MSG_MT_DEST_REFERRED_USER; in qcom_slim_ngd_enable_stream()
1007 txn.dt = SLIM_MSG_DEST_LOGICALADDR; in qcom_slim_ngd_enable_stream()
1008 txn.la = SLIM_LA_MGR; in qcom_slim_ngd_enable_stream()
1009 txn.ec = 0; in qcom_slim_ngd_enable_stream()
1010 txn.msg = &msg; in qcom_slim_ngd_enable_stream()
1011 txn.msg->num_bytes = 0; in qcom_slim_ngd_enable_stream()
1012 txn.msg->wbuf = wbuf; in qcom_slim_ngd_enable_stream()
1013 txn.msg->rbuf = rbuf; in qcom_slim_ngd_enable_stream()
1018 if (txn.msg->num_bytes == 0) { in qcom_slim_ngd_enable_stream()
1021 wbuf[txn.msg->num_bytes++] = sdev->laddr; in qcom_slim_ngd_enable_stream()
1022 wbuf[txn.msg->num_bytes] = rt->bps >> 2 | in qcom_slim_ngd_enable_stream()
1035 wbuf[txn.msg->num_bytes] |= BIT(5); in qcom_slim_ngd_enable_stream()
1037 txn.msg->num_bytes++; in qcom_slim_ngd_enable_stream()
1038 wbuf[txn.msg->num_bytes++] = exp << 4 | rt->prot; in qcom_slim_ngd_enable_stream()
1041 wbuf[txn.msg->num_bytes++] = in qcom_slim_ngd_enable_stream()
1045 wbuf[txn.msg->num_bytes++] = port->ch.prrate; in qcom_slim_ngd_enable_stream()
1047 ret = slim_alloc_txn_tid(ctrl, &txn); in qcom_slim_ngd_enable_stream()
1052 wbuf[txn.msg->num_bytes++] = txn.tid; in qcom_slim_ngd_enable_stream()
1054 wbuf[txn.msg->num_bytes++] = port->ch.id; in qcom_slim_ngd_enable_stream()
1057 txn.mc = SLIM_USR_MC_DEF_ACT_CHAN; in qcom_slim_ngd_enable_stream()
1058 txn.rl = txn.msg->num_bytes + 4; in qcom_slim_ngd_enable_stream()
1059 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn); in qcom_slim_ngd_enable_stream()
1061 slim_free_txn_tid(ctrl, &txn); in qcom_slim_ngd_enable_stream()
1062 dev_err(&sdev->dev, "TX timed out:MC:0x%x,mt:0x%x", txn.mc, in qcom_slim_ngd_enable_stream()
1063 txn.mt); in qcom_slim_ngd_enable_stream()
1067 txn.mc = SLIM_USR_MC_RECONFIG_NOW; in qcom_slim_ngd_enable_stream()
1068 txn.msg->num_bytes = 2; in qcom_slim_ngd_enable_stream()
1070 txn.rl = txn.msg->num_bytes + 4; in qcom_slim_ngd_enable_stream()
1072 ret = slim_alloc_txn_tid(ctrl, &txn); in qcom_slim_ngd_enable_stream()
1078 wbuf[0] = txn.tid; in qcom_slim_ngd_enable_stream()
1079 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn); in qcom_slim_ngd_enable_stream()
1081 slim_free_txn_tid(ctrl, &txn); in qcom_slim_ngd_enable_stream()
1082 dev_err(&sdev->dev, "TX timed out:MC:0x%x,mt:0x%x", txn.mc, in qcom_slim_ngd_enable_stream()
1083 txn.mt); in qcom_slim_ngd_enable_stream()
1094 struct slim_msg_txn txn; in qcom_slim_ngd_get_laddr() local
1099 txn.mt = SLIM_MSG_MT_DEST_REFERRED_USER; in qcom_slim_ngd_get_laddr()
1100 txn.dt = SLIM_MSG_DEST_LOGICALADDR; in qcom_slim_ngd_get_laddr()
1101 txn.la = SLIM_LA_MGR; in qcom_slim_ngd_get_laddr()
1102 txn.ec = 0; in qcom_slim_ngd_get_laddr()
1104 txn.mc = SLIM_USR_MC_ADDR_QUERY; in qcom_slim_ngd_get_laddr()
1105 txn.rl = 11; in qcom_slim_ngd_get_laddr()
1106 txn.msg = &msg; in qcom_slim_ngd_get_laddr()
1107 txn.msg->num_bytes = 7; in qcom_slim_ngd_get_laddr()
1108 txn.msg->wbuf = wbuf; in qcom_slim_ngd_get_laddr()
1109 txn.msg->rbuf = rbuf; in qcom_slim_ngd_get_laddr()
1111 ret = slim_alloc_txn_tid(ctrl, &txn); in qcom_slim_ngd_get_laddr()
1115 wbuf[0] = (u8)txn.tid; in qcom_slim_ngd_get_laddr()
1118 ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn); in qcom_slim_ngd_get_laddr()
1120 slim_free_txn_tid(ctrl, &txn); in qcom_slim_ngd_get_laddr()
1250 struct slim_msg_txn txn; in qcom_slim_ngd_master_worker() local
1257 txn.dt = SLIM_MSG_DEST_LOGICALADDR; in qcom_slim_ngd_master_worker()
1258 txn.ec = 0; in qcom_slim_ngd_master_worker()
1259 txn.mc = SLIM_USR_MC_REPORT_SATELLITE; in qcom_slim_ngd_master_worker()
1260 txn.mt = SLIM_MSG_MT_SRC_REFERRED_USER; in qcom_slim_ngd_master_worker()
1261 txn.la = SLIM_LA_MGR; in qcom_slim_ngd_master_worker()
1266 txn.msg = &msg; in qcom_slim_ngd_master_worker()
1267 txn.msg->wbuf = wbuf; in qcom_slim_ngd_master_worker()
1268 txn.msg->num_bytes = 4; in qcom_slim_ngd_master_worker()
1269 txn.rl = 8; in qcom_slim_ngd_master_worker()
1274 ret = qcom_slim_ngd_xfer_msg(&ctrl->ctrl, &txn); in qcom_slim_ngd_master_worker()