[PATCH 1/3] nvme: add CNTRLTYPE definitions for 'identify controller'

Michael Reed michael.reed at canonical.com
Tue Jun 21 21:53:30 UTC 2022


From: Hannes Reinecke <hare at suse.de>

Update the 'identify controller' structure to define the newly added
CNTRLTYPE field.

BugLink: https://bugs.launchpad.net/bugs/1948626

Signed-off-by: Hannes Reinecke <hare at suse.de>
Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani at oracle.com>
Signed-off-by: Christoph Hellwig <hch at lst.de>
(cherry picked from commit e15a8a9755659ff5972f30de4dd64867c97f242d linux-next)
Signed-off-by: Michael Reed <Michael.Reed at canonical.com>
---
 include/linux/nvme.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index b7c4c4130b65..ed2428918bca 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -31,6 +31,12 @@ enum nvme_subsys_type {
 	NVME_NQN_NVME	= 2,		/* NVME type target subsystem */
 };
 
+enum nvme_ctrl_type {
+	NVME_CTRL_IO	= 1,		/* I/O controller */
+	NVME_CTRL_DISC	= 2,		/* Discovery controller */
+	NVME_CTRL_ADMIN	= 3,		/* Administrative controller */
+};
+
 /* Address Family codes for Discovery Log Page entry ADRFAM field */
 enum {
 	NVMF_ADDR_FAMILY_PCI	= 0,	/* PCIe */
@@ -244,7 +250,9 @@ struct nvme_id_ctrl {
 	__le32			rtd3e;
 	__le32			oaes;
 	__le32			ctratt;
-	__u8			rsvd100[28];
+	__u8			rsvd100[11];
+	__u8			cntrltype;
+	__u8			fguid[16];
 	__le16			crdt1;
 	__le16			crdt2;
 	__le16			crdt3;
-- 
2.25.1




More information about the kernel-team mailing list