diff options
author | Ian Moffett <ian@osmora.org> | 2024-04-08 23:21:03 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-04-08 23:21:03 -0400 |
commit | 3c8dd7d392dc50ca9d356beefba7820a14d7fd74 (patch) | |
tree | 1c84da02fb1f243e262eb13c2ca58a71758ceb20 | |
parent | 803b03e1bfe87dc28c387a22b4559423945f2bdd (diff) |
kernel: nvme: Add more comments
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | sys/dev/ic/nvme.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index 7b79da9..dcdb5a8 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -288,6 +288,11 @@ nvme_rw(struct nvme_ns *ns, char *buf, off_t slba, size_t count, bool write) return nvme_poll_submit_cmd(&ns->ioq, cmd); } +/* + * Fetch a namespace from its ID + * + * @nsid: Namespace ID of namespace to fetch + */ static struct nvme_ns * nvme_get_ns(size_t nsid) { @@ -302,6 +307,9 @@ nvme_get_ns(size_t nsid) return NULL; } +/* + * Device interface read/write helper + */ static int nvme_dev_rw(struct device *dev, struct sio_txn *sio, bool write) { @@ -319,12 +327,18 @@ nvme_dev_rw(struct device *dev, struct sio_txn *sio, bool write) return nvme_rw(ns, sio->buf, sio->offset, sio->len, write); } +/* + * Device interface read + */ static int nvme_dev_read(struct device *dev, struct sio_txn *sio) { return nvme_dev_rw(dev, sio, false); } +/* + * Device interface write + */ static int nvme_dev_write(struct device *dev, struct sio_txn *sio) { |