Lines Matching full:reply
36 * struct qnap_mcu_reply - Reply to a command
38 * @data: Buffer to store reply payload in
39 * @length: Expected reply length, including the checksum
41 * @done: Triggered when the entire reply has been received
55 * @reply: Reply data structure
62 struct qnap_mcu_reply reply; member
103 struct qnap_mcu_reply *reply = &mcu->reply; in qnap_mcu_receive_buf() local
107 if (!reply->length) { in qnap_mcu_receive_buf()
113 reply->data[reply->received] = *src++; in qnap_mcu_receive_buf()
114 reply->received++; in qnap_mcu_receive_buf()
116 if (reply->received == reply->length) { in qnap_mcu_receive_buf()
118 reply->length = 0; in qnap_mcu_receive_buf()
120 complete(&reply->done); in qnap_mcu_receive_buf()
151 struct qnap_mcu_reply *reply = &mcu->reply; in qnap_mcu_exec() local
161 reply->data = rx, in qnap_mcu_exec()
162 reply->length = length, in qnap_mcu_exec()
163 reply->received = 0, in qnap_mcu_exec()
164 reinit_completion(&reply->done); in qnap_mcu_exec()
170 if (!wait_for_completion_timeout(&reply->done, msecs_to_jiffies(QNAP_MCU_TIMEOUT_MS))) { in qnap_mcu_exec()
216 /* Reply is the 2 command-bytes + 4 bytes describing the version */ in qnap_mcu_get_version()
282 init_completion(&mcu->reply.done); in qnap_mcu_probe()