summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinjun Bao <meljbao@gmail.com>2022-08-11 10:40:24 +0300
committerChristoph Hellwig <hch@lst.de>2022-09-19 12:33:53 +0300
commit1abc696174f1ba27c9563c722029373e1a692933 (patch)
tree3a46a8bcc5c3325355acd7c69937c9d3c6b6fdba
parent91418cc4fd8f8e2e21b409eb8983d074359c8be6 (diff)
downloadlinux-1abc696174f1ba27c9563c722029373e1a692933.tar.xz
nvme: add comment for unaligned "fake" nqn
Current "fake" nqn field is "nqn.2014.08.org.nvmexpress:", it is not aligned with the canonical version for history reasons. Signed-off-by: Linjun Bao <meljbao@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/nvme/host/core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index af367b22871b..112881664695 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2704,7 +2704,11 @@ static void nvme_init_subnqn(struct nvme_subsystem *subsys, struct nvme_ctrl *ct
dev_warn(ctrl->device, "missing or invalid SUBNQN field.\n");
}
- /* Generate a "fake" NQN per Figure 254 in NVMe 1.3 + ECN 001 */
+ /*
+ * Generate a "fake" NQN similar to the one in Section 4.5 of the NVMe
+ * Base Specification 2.0. It is slightly different from the format
+ * specified there due to historic reasons, and we can't change it now.
+ */
off = snprintf(subsys->subnqn, NVMF_NQN_SIZE,
"nqn.2014.08.org.nvmexpress:%04x%04x",
le16_to_cpu(id->vid), le16_to_cpu(id->ssvid));