From 320f1c6a451548b939483d8956111438238c6515 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 14 Jul 2024 00:25:04 -0400 Subject: kernel: nvme: Sleep before status check Signed-off-by: Ian Moffett --- sys/dev/ic/nvme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index a9cbd2b..f3a16ce 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -279,6 +279,8 @@ nvme_poll_submit_cmd(struct nvme_queue *q, struct nvme_cmd cmd) nvme_submit_cmd(q, cmd); for (;;) { + tmr.msleep(100); + /* * If the phase bit matches the most recently submitted * command then the command has completed @@ -294,7 +296,6 @@ nvme_poll_submit_cmd(struct nvme_queue *q, struct nvme_cmd cmd) return -ETIME; } - tmr.msleep(150); ++spins; } -- cgit v1.2.3