VirtQueue: dra7xx: poll for init completion status
authorTero Kristo <t-kristo@ti.com>
Fri, 13 Dec 2019 11:21:15 +0000 (13:21 +0200)
committerTero Kristo <t-kristo@ti.com>
Mon, 16 Dec 2019 08:30:53 +0000 (10:30 +0200)
Virtqueue device address is provided by host, so poll the completion
status for this operation before proceeding. Otherwise we end up using
bad virtqueue address.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
packages/ti/ipc/family/vayu/VirtQueue.c

index f4c52a03ba8f449ca70c7949ce31095bf9d5377f..e859e04c094bc611b5185081beb2bf9553cf1a88 100644 (file)
@@ -233,6 +233,8 @@ static Void _VirtQueue_init()
             return;
         }
 
+        while (Resource_getVdevStatus(VIRTIO_ID_RPMSG) != VRING_BUFS_PRIMED);
+
         initialized = 1;
     }
 }