34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
|
From 3146340e66f9dae5817c0a9592f8e375c2cf9e77 Mon Sep 17 00:00:00 2001
|
||
|
From: Yongrong Wang <wangyongrong@xiaomi.com>
|
||
|
Date: Wed, 31 Jul 2024 15:36:43 +0800
|
||
|
Subject: [PATCH 12/14] rpmsg_virtio.c: fix get_tx_payload_buffer error
|
||
|
|
||
|
Always sleep when notify wait return not RPMSG_SUCCESS
|
||
|
|
||
|
Change-Id: I2fa50e649de36114597fec09dfcf96c7d2d35546
|
||
|
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
|
||
|
---
|
||
|
lib/rpmsg/rpmsg_virtio.c | 4 +---
|
||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/lib/rpmsg/rpmsg_virtio.c open-amp/lib/rpmsg/rpmsg_virtio.c
|
||
|
index e54155f..7aeec5b 100644
|
||
|
--- a/lib/rpmsg/rpmsg_virtio.c
|
||
|
+++ open-amp/lib/rpmsg/rpmsg_virtio.c
|
||
|
@@ -378,11 +378,9 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
|
||
|
* use metal_sleep_usec() method by default.
|
||
|
*/
|
||
|
status = rpmsg_virtio_notify_wait(rvdev, rvdev->rvq);
|
||
|
- if (status == RPMSG_EOPNOTSUPP) {
|
||
|
+ if (status != RPMSG_SUCCESS) {
|
||
|
metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL);
|
||
|
tick_count--;
|
||
|
- } else if (status == RPMSG_SUCCESS) {
|
||
|
- break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.34.1
|
||
|
|