summaryrefslogtreecommitdiffstats
path: root/doc/man/nvme_status_type.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-05 18:17:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-05 18:17:32 +0000
commitb0dc2feab3271dbcb42df6e6d8a37138a90c44a1 (patch)
treeae02f159c125f183b2adae47fdf0e64357bf76a8 /doc/man/nvme_status_type.2
parentReleasing debian version 1.1-2. (diff)
downloadlibnvme-b0dc2feab3271dbcb42df6e6d8a37138a90c44a1.tar.xz
libnvme-b0dc2feab3271dbcb42df6e6d8a37138a90c44a1.zip
Merging upstream version 1.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/man/nvme_status_type.2')
-rw-r--r--doc/man/nvme_status_type.240
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/man/nvme_status_type.2 b/doc/man/nvme_status_type.2
new file mode 100644
index 0000000..60056ee
--- /dev/null
+++ b/doc/man/nvme_status_type.2
@@ -0,0 +1,40 @@
+.TH "libnvme" 9 "enum nvme_status_type" "October 2022" "API Manual" LINUX
+.SH NAME
+enum nvme_status_type \- type encoding for NVMe return values, when represented as an int.
+.SH SYNOPSIS
+enum nvme_status_type {
+.br
+.BI " NVME_STATUS_TYPE_SHIFT"
+,
+.br
+.br
+.BI " NVME_STATUS_TYPE_MASK"
+,
+.br
+.br
+.BI " NVME_STATUS_TYPE_NVME"
+,
+.br
+.br
+.BI " NVME_STATUS_TYPE_MI"
+
+};
+.SH Constants
+.IP "NVME_STATUS_TYPE_SHIFT" 12
+shift value for status bits
+.IP "NVME_STATUS_TYPE_MASK" 12
+mask value for status bits
+.IP "NVME_STATUS_TYPE_NVME" 12
+NVMe command status value, typically from CDW3
+.IP "NVME_STATUS_TYPE_MI" 12
+NVMe-MI header status
+.SH "Description"
+
+The nvme_* api returns an int, with negative values indicating an internal
+or syscall error, zero signifying success, positive values representing
+the NVMe status.
+
+That latter case (the NVMe status) may represent status values from
+different parts of the transport/controller/etc, and are at most 16 bits of
+data. So, we use the most-significant 3 bits of the signed int to indicate
+which type of status this is.