Lines Matching refs:out_trans

357 	struct wire_trans_passthrough *out_trans;  in encode_passthrough()  local
378 out_trans = (struct wire_trans_passthrough *)&trans_wrapper->trans; in encode_passthrough()
380 memcpy(out_trans->data, in_trans->data, in_trans->hdr.len - sizeof(in_trans->hdr)); in encode_passthrough()
384 out_trans->hdr.type = cpu_to_le32(QAIC_TRANS_PASSTHROUGH_TO_DEV); in encode_passthrough()
385 out_trans->hdr.len = cpu_to_le32(in_trans->hdr.len); in encode_passthrough()
482 struct wire_trans_dma_xfer **out_trans) in encode_addr_size_pairs() argument
498 *size = QAIC_MANAGE_EXT_MSG_LENGTH - msg_hdr_len - sizeof(**out_trans); in encode_addr_size_pairs()
511 *out_trans = (struct wire_trans_dma_xfer *)&trans_wrapper->trans; in encode_addr_size_pairs()
513 asp = (*out_trans)->data; in encode_addr_size_pairs()
564 struct wire_trans_dma_xfer *out_trans; in encode_dma() local
578 if (size_add(msg_hdr_len, sizeof(*out_trans) + sizeof(struct wire_addr_size_pair)) > in encode_dma()
592 ret = encode_addr_size_pairs(xfer, wrappers, resources, msg_hdr_len, &size, &out_trans); in encode_dma()
601 out_trans->hdr.type = cpu_to_le32(QAIC_TRANS_DMA_XFER_TO_DEV); in encode_dma()
602 out_trans->hdr.len = cpu_to_le32(size); in encode_dma()
603 out_trans->tag = cpu_to_le32(in_trans->tag); in encode_dma()
604 out_trans->count = cpu_to_le32((size - sizeof(*out_trans)) / in encode_dma()
610 out_trans->dma_chunk_id = cpu_to_le32(resources->dma_chunk_id); in encode_dma()
615 out_trans->dma_chunk_id = cpu_to_le32(resources->dma_chunk_id); in encode_dma()
633 struct wire_trans_activate_to_dev *out_trans; in encode_activate() local
648 if (size_add(msg_hdr_len, sizeof(*out_trans)) > QAIC_MANAGE_MAX_MSG_LENGTH) in encode_activate()
672 offsetof(struct wrapper_msg, trans) + sizeof(*out_trans)); in encode_activate()
677 trans_wrapper->len = sizeof(*out_trans); in encode_activate()
678 out_trans = (struct wire_trans_activate_to_dev *)&trans_wrapper->trans; in encode_activate()
680 out_trans->hdr.type = cpu_to_le32(QAIC_TRANS_ACTIVATE_TO_DEV); in encode_activate()
681 out_trans->hdr.len = cpu_to_le32(sizeof(*out_trans)); in encode_activate()
682 out_trans->buf_len = cpu_to_le32(size); in encode_activate()
683 out_trans->req_q_addr = cpu_to_le64(dma_addr); in encode_activate()
684 out_trans->req_q_size = cpu_to_le32(nelem); in encode_activate()
685 out_trans->rsp_q_addr = cpu_to_le64(dma_addr + size - nelem * get_dbc_rsp_elem_size()); in encode_activate()
686 out_trans->rsp_q_size = cpu_to_le32(nelem); in encode_activate()
687 out_trans->options = cpu_to_le32(in_trans->options); in encode_activate()
690 msg->hdr.len = cpu_to_le32(msg_hdr_len + sizeof(*out_trans)); in encode_activate()
722 struct wire_trans_status_to_dev *out_trans; in encode_status() local
739 trans_wrapper->len = sizeof(*out_trans); in encode_status()
740 out_trans = (struct wire_trans_status_to_dev *)&trans_wrapper->trans; in encode_status()
742 out_trans->hdr.type = cpu_to_le32(QAIC_TRANS_STATUS_TO_DEV); in encode_status()
743 out_trans->hdr.len = cpu_to_le32(in_trans->hdr.len); in encode_status()
831 struct qaic_manage_trans_passthrough *out_trans; in decode_passthrough() local
835 out_trans = (void *)user_msg->data + user_msg->len; in decode_passthrough()
844 memcpy(out_trans->data, in_trans->data, len - sizeof(in_trans->hdr)); in decode_passthrough()
847 out_trans->hdr.type = le32_to_cpu(in_trans->hdr.type); in decode_passthrough()
848 out_trans->hdr.len = len; in decode_passthrough()
856 struct qaic_manage_trans_activate_from_dev *out_trans; in decode_activate() local
860 out_trans = (void *)user_msg->data + user_msg->len; in decode_activate()
868 out_trans->hdr.type = le32_to_cpu(in_trans->hdr.type); in decode_activate()
869 out_trans->hdr.len = len; in decode_activate()
870 out_trans->status = le32_to_cpu(in_trans->status); in decode_activate()
871 out_trans->dbc_id = le32_to_cpu(in_trans->dbc_id); in decode_activate()
872 out_trans->options = le64_to_cpu(in_trans->options); in decode_activate()
878 if (out_trans->dbc_id >= qdev->num_dbc) in decode_activate()
885 if (out_trans->status) in decode_activate()
892 resources->status = out_trans->status; in decode_activate()
893 resources->dbc_id = out_trans->dbc_id; in decode_activate()
932 struct qaic_manage_trans_status_from_dev *out_trans; in decode_status() local
936 out_trans = (void *)user_msg->data + user_msg->len; in decode_status()
942 out_trans->hdr.type = QAIC_TRANS_STATUS_FROM_DEV; in decode_status()
943 out_trans->hdr.len = len; in decode_status()
944 out_trans->major = le16_to_cpu(in_trans->major); in decode_status()
945 out_trans->minor = le16_to_cpu(in_trans->minor); in decode_status()
946 out_trans->status_flags = le64_to_cpu(in_trans->status_flags); in decode_status()
947 out_trans->status = le32_to_cpu(in_trans->status); in decode_status()
951 if (out_trans->status) in decode_status()
953 if (out_trans->status_flags & BIT(0) && !valid_crc(msg)) in decode_status()
1128 struct wire_trans_dma_xfer *out_trans; in abort_dma_cont() local
1129 u32 size = sizeof(*out_trans); in abort_dma_cont()
1147 out_trans = (struct wire_trans_dma_xfer *)&wrapper->trans; in abort_dma_cont()
1148 out_trans->hdr.type = cpu_to_le32(QAIC_TRANS_DMA_XFER_TO_DEV); in abort_dma_cont()
1149 out_trans->hdr.len = cpu_to_le32(size); in abort_dma_cont()
1150 out_trans->tag = cpu_to_le32(0); in abort_dma_cont()
1151 out_trans->count = cpu_to_le32(0); in abort_dma_cont()
1152 out_trans->dma_chunk_id = cpu_to_le32(dma_chunk_id); in abort_dma_cont()