Skip to content

Commit 603345c

Browse files
committed
rpmsg_virtio.c: fix get_tx_payload_buffer error
1. driver/rptun_notify_wait and driver/rpmsg_virtio_notify_wait may return -EAGAIN, so if only judge status == RPMSG_EOPNOTSUPP,it will cause busy loop in rpmsg_virtio_get_tx_payload_buffer; 2. remove redundant logic of continue. Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
1 parent e2f80cb commit 603345c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/rpmsg/rpmsg_virtio.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,9 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
384384
* use metal_sleep_usec() method by default.
385385
*/
386386
status = rpmsg_virtio_notify_wait(rvdev, rvdev->rvq);
387-
if (status == RPMSG_EOPNOTSUPP) {
387+
if (status != RPMSG_SUCCESS) {
388388
metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL);
389389
tick_count--;
390-
} else if (status == RPMSG_SUCCESS) {
391-
break;
392390
}
393391
}
394392

0 commit comments

Comments
 (0)