Lines Matching refs:rx
159 struct sahara_packet *rx;
284 le32_to_cpu(context->rx->length),
285 le32_to_cpu(context->rx->hello.version),
286 le32_to_cpu(context->rx->hello.version_compat),
287 le32_to_cpu(context->rx->hello.max_length),
288 le32_to_cpu(context->rx->hello.mode));
290 if (le32_to_cpu(context->rx->length) != SAHARA_HELLO_LENGTH) {
292 le32_to_cpu(context->rx->length));
295 if (le32_to_cpu(context->rx->hello.version) != SAHARA_VERSION) {
297 le32_to_cpu(context->rx->hello.version));
301 if (le32_to_cpu(context->rx->hello.mode) != SAHARA_MODE_IMAGE_TX_PENDING &&
302 le32_to_cpu(context->rx->hello.mode) != SAHARA_MODE_IMAGE_TX_COMPLETE &&
303 le32_to_cpu(context->rx->hello.mode) != SAHARA_MODE_MEMORY_DEBUG) {
305 le32_to_cpu(context->rx->hello.mode));
314 context->tx[0]->hello_resp.mode = context->rx->hello_resp.mode;
330 le32_to_cpu(context->rx->length),
331 le32_to_cpu(context->rx->read_data.image),
332 le32_to_cpu(context->rx->read_data.offset),
333 le32_to_cpu(context->rx->read_data.length));
335 if (le32_to_cpu(context->rx->length) != SAHARA_READ_DATA_LENGTH) {
337 le32_to_cpu(context->rx->length));
341 image_id = le32_to_cpu(context->rx->read_data.image);
342 data_offset = le32_to_cpu(context->rx->read_data.offset);
343 data_len = le32_to_cpu(context->rx->read_data.length);
406 le32_to_cpu(context->rx->length),
407 le32_to_cpu(context->rx->end_of_image.image),
408 le32_to_cpu(context->rx->end_of_image.status));
410 if (le32_to_cpu(context->rx->length) != SAHARA_END_OF_IMAGE_LENGTH) {
412 le32_to_cpu(context->rx->length));
417 le32_to_cpu(context->rx->end_of_image.image) != context->active_image_id) {
419 le32_to_cpu(context->rx->end_of_image.image));
425 if (le32_to_cpu(context->rx->end_of_image.status))
443 le32_to_cpu(context->rx->length),
444 le64_to_cpu(context->rx->memory_debug64.table_address),
445 le64_to_cpu(context->rx->memory_debug64.table_length));
447 if (le32_to_cpu(context->rx->length) != SAHARA_MEM_DEBUG64_LENGTH) {
449 le32_to_cpu(context->rx->length));
453 context->dump_table_address = le64_to_cpu(context->rx->memory_debug64.table_address);
454 context->dump_table_length = le64_to_cpu(context->rx->memory_debug64.table_length);
503 switch (le32_to_cpu(context->rx->cmd)) {
524 le32_to_cpu(context->rx->cmd));
528 ret = mhi_queue_buf(context->mhi_dev, DMA_FROM_DEVICE, context->rx,
531 dev_err(&context->mhi_dev->dev, "Unable to requeue rx buf %d\n", ret);
548 dev_table = (struct sahara_debug_table_entry64 *)(context->rx);
643 memcpy(context->mem_dump_freespace, context->rx, context->rx_size);
706 le32_to_cpu(context->rx->cmd) == SAHARA_END_OF_IMAGE_CMD) {
709 le32_to_cpu(context->rx->end_of_image.status));
714 le32_to_cpu(context->rx->cmd) != SAHARA_END_OF_IMAGE_CMD) {
717 le32_to_cpu(context->rx->cmd));
732 ret = mhi_queue_buf(context->mhi_dev, DMA_FROM_DEVICE, context->rx,
735 dev_err(&context->mhi_dev->dev, "Unable to requeue rx buf %d\n", ret);
755 context->rx = devm_kzalloc(&mhi_dev->dev, SAHARA_PACKET_MAX_SIZE, GFP_KERNEL);
756 if (!context->rx)
795 ret = mhi_queue_buf(mhi_dev, DMA_FROM_DEVICE, context->rx, SAHARA_PACKET_MAX_SIZE, MHI_EOT);