Files
nuttx/openamp/0006-rpmsg_virtio-don-t-need-check-status-when-get_tx_pay.patch
T
Bowen Wang 0a26f09c6b openamp: make the remoteproc virtio fit more virtio devices
1. add cpuname config for the rpmsg virtio devices, so the rpmsg virtio
driver can get the local and remote cpuname from the virtio config
space, and we can distinguish the differnt channel when there are
two rpmsg virtio devices in the same resource table;
2. optimize the remoteproc virtio transport layer to make it can
work with all the virtio devices instead only work with rpmsg virtio
devices;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00

39 lines
1.2 KiB
Diff

From 8dcd7daec66939841c10872a0ca310ac16f10be2 Mon Sep 17 00:00:00 2001
From: wangyongrong <wangyongrong@xiaomi.com>
Date: Wed, 3 Jul 2024 10:28:31 +0800
Subject: [PATCH 06/12] rpmsg_virtio: don't need check status when
get_tx_payload
Signed-off-by: ligd <liguiding1@xiaomi.com>
---
lib/rpmsg/rpmsg_virtio.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/lib/rpmsg/rpmsg_virtio.c open-amp/lib/rpmsg/rpmsg_virtio.c
index 0e2885c732..6df5a52a48 100644
--- a/lib/rpmsg/rpmsg_virtio.c
+++ open-amp/lib/rpmsg/rpmsg_virtio.c
@@ -355,7 +355,6 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
{
struct rpmsg_virtio_device *rvdev;
struct rpmsg_hdr *rp_hdr;
- uint8_t virtio_status;
uint16_t idx;
int tick_count;
int status;
@@ -363,11 +362,6 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
/* Get the associated remote device for channel. */
rvdev = metal_container_of(rdev, struct rpmsg_virtio_device, rdev);
- /* Validate device state */
- status = virtio_get_status(rvdev->vdev, &virtio_status);
- if (status || !(virtio_status & VIRTIO_CONFIG_STATUS_DRIVER_OK))
- return NULL;
-
if (wait)
tick_count = RPMSG_TICK_COUNT / RPMSG_TICKS_PER_INTERVAL;
else
--
2.34.1