summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/nvme/nvme.c')
-rw-r--r--sys/dev/nvme/nvme.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c
index afebae7..dfc4917 100644
--- a/sys/dev/nvme/nvme.c
+++ b/sys/dev/nvme/nvme.c
@@ -397,3 +397,18 @@ nvme_unregister_consumer(struct nvme_consumer *consumer)
consumer->id = INVALID_CONSUMER_ID;
}
+void
+nvme_completion_poll_cb(void *arg, const struct nvme_completion *cpl)
+{
+ struct nvme_completion_poll_status *status = arg;
+
+ /*
+ * Copy status into the argument passed by the caller, so that
+ * the caller can check the status to determine if the
+ * the request passed or failed.
+ */
+ memcpy(&status->cpl, cpl, sizeof(*cpl));
+ wmb();
+ status->done = TRUE;
+}
+
OpenPOWER on IntegriCloud