aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/ethosu_mailbox.c4
-rw-r--r--utils/inference_runner/inference_runner.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/kernel/ethosu_mailbox.c b/kernel/ethosu_mailbox.c
index 158a7f5..7f159f3 100644
--- a/kernel/ethosu_mailbox.c
+++ b/kernel/ethosu_mailbox.c
@@ -128,7 +128,9 @@ static int ethosu_queue_read(struct ethosu_mailbox *mbox,
uint32_t rpos = queue->header.read;
size_t queue_avail = ethosu_queue_available(queue);
- if (queue_avail == 0)
+ if (length == 0)
+ return 0;
+ else if (queue_avail == 0)
return -ENOMSG;
else if (length > queue_avail)
return -EBADMSG;
diff --git a/utils/inference_runner/inference_runner.cpp b/utils/inference_runner/inference_runner.cpp
index 17969da..f2e1fa1 100644
--- a/utils/inference_runner/inference_runner.cpp
+++ b/utils/inference_runner/inference_runner.cpp
@@ -207,6 +207,9 @@ int main(int argc, char *argv[]) {
try {
Device device;
+ cout << "Send Ping" << endl;
+ device.ioctl(ETHOSU_IOCTL_PING);
+
cout << "Send version request" << endl;
device.ioctl(ETHOSU_IOCTL_VERSION_REQ);