summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-04-13 11:56:51 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-04-13 11:56:51 +0000
commitb35af2fdee8153c263c56162d0e48964606609c2 (patch)
treec00ab570d46ccd972b97c885a542e60ae375901b
parent1a7b7ee98462464d42039a6cd4b99318976ab82f (diff)
nvme_sqe_fill will post a copy of an sqe from a caller
-rw-r--r--sys/dev/ic/nvme.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index c35c7dd35ac..ba64e73b0a6 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme.c,v 1.20 2016/04/13 11:54:33 dlg Exp $ */
+/* $OpenBSD: nvme.c,v 1.21 2016/04/13 11:56:50 dlg Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -60,6 +60,7 @@ int nvme_poll(struct nvme_softc *, struct nvme_queue *, struct nvme_ccb *,
void nvme_poll_fill(struct nvme_softc *, struct nvme_ccb *, void *);
void nvme_poll_done(struct nvme_softc *, struct nvme_ccb *,
struct nvme_cqe *);
+void nvme_sqe_fill(struct nvme_softc *, struct nvme_ccb *, void *);
void nvme_empty_done(struct nvme_softc *, struct nvme_ccb *,
struct nvme_cqe *);
@@ -409,6 +410,15 @@ nvme_poll_done(struct nvme_softc *sc, struct nvme_ccb *ccb,
}
void
+nvme_sqe_fill(struct nvme_softc *sc, struct nvme_ccb *ccb, void *slot)
+{
+ struct nvme_sqe *src = ccb->ccb_cookie;
+ struct nvme_sqe *dst = slot;
+
+ *dst = *src;
+}
+
+void
nvme_empty_done(struct nvme_softc *sc, struct nvme_ccb *ccb,
struct nvme_cqe *cqe)
{