Lines Matching full:response
88 * struct response_info - Encapsulate firmware response related
97 * @token: Expected token for response that we are waiting on.
98 * @received: Set to true on receiving a valid firmware response to host command
99 * @wait_queue: Wait queue for host to wait for firmware response.
116 * @response: Response info passing between ish_send() and process_recv().
128 * Used for passing firmware response information between
131 struct response_info response; member
176 /* Setup for incoming response */ in ish_send()
177 client_data->response.data = in_msg; in ish_send()
178 client_data->response.max_size = in_size; in ish_send()
179 client_data->response.error = 0; in ish_send()
180 client_data->response.token = next_token++; in ish_send()
181 client_data->response.received = false; in ish_send()
183 out_hdr->token = client_data->response.token; in ish_send()
192 wait_event_interruptible_timeout(client_data->response.wait_queue, in ish_send()
193 client_data->response.received, in ish_send()
195 if (!client_data->response.received) { in ish_send()
197 "Timed out for response to host message\n"); in ish_send()
201 if (client_data->response.error < 0) in ish_send()
202 return client_data->response.error; in ish_send()
204 return client_data->response.size; in ish_send()
213 * Parse the incoming packet. If it is a response packet then it will
215 * response. If it is an event packet then it will schedule event work.
242 client_data->response.error = -EBADMSG; in process_recv()
249 client_data->response.error = -EMSGSIZE; in process_recv()
258 if (client_data->response.received) { in process_recv()
264 if (client_data->response.token != in_msg->hdr.token) { in process_recv()
266 "Dropping old response token %d\n", in process_recv()
272 if (!client_data->response.data) { in process_recv()
275 client_data->response.error = -EINVAL; in process_recv()
279 if (data_len > client_data->response.max_size) { in process_recv()
282 data_len, client_data->response.max_size); in process_recv()
283 client_data->response.error = -EMSGSIZE; in process_recv()
290 client_data->response.error = -EIO; in process_recv()
295 client_data->response.size = data_len; in process_recv()
298 * Copy the buffer received in firmware response for the in process_recv()
301 memcpy(client_data->response.data, in process_recv()
310 client_data->response.received = true; in process_recv()
313 wake_up_interruptible(&client_data->response.wait_queue); in process_recv()
456 /* Check response error code */ in prepare_cros_ec_rx()
468 /* Copy response packet payload and compute checksum */ in prepare_cros_ec_rx()
537 /* Send command to ISH EC firmware and read response */ in cros_ec_pkt_xfer_ish()
668 init_waitqueue_head(&client_data->response.wait_queue); in cros_ec_ishtp_probe()