git: 7fa8adb8c5cd - main - nvme: Add constants for the Controller Attributes field in cdata

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sat, 23 Mar 2024 00:25:39 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=7fa8adb8c5cd46979b76770794ac1b6584e8baa7

commit 7fa8adb8c5cd46979b76770794ac1b6584e8baa7
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-03-23 00:24:31 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-03-23 00:24:31 +0000

    nvme: Add constants for the Controller Attributes field in cdata
    
    Reviewed by:    imp
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D44447
---
 sys/dev/nvme/nvme.h | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h
index fcc96a26eeb1..8e99cb7b5356 100644
--- a/sys/dev/nvme/nvme.h
+++ b/sys/dev/nvme/nvme.h
@@ -311,6 +311,38 @@ enum nvme_psdt {
 #define NVME_CTRLR_DATA_OAES_LOG_PAGE_CHANGE_SHIFT	(31)
 #define NVME_CTRLR_DATA_OAES_LOG_PAGE_CHANGE_MASK	(0x1)
 
+/** CTRATT - Controller Attributes */
+/* supports 128-bit Host Identifier */
+#define NVME_CTRLR_DATA_CTRATT_128BIT_HOSTID_SHIFT	(0)
+#define NVME_CTRLR_DATA_CTRATT_128BIT_HOSTID_MASK	(0x1)
+/* supports Non-Operational Power State Permissive Mode */
+#define NVME_CTRLR_DATA_CTRATT_NONOP_POWER_STATE_SHIFT	(1)
+#define NVME_CTRLR_DATA_CTRATT_NONOP_POWER_STATE_MASK	(0x1)
+/* supports NVM Sets */
+#define NVME_CTRLR_DATA_CTRATT_NVM_SETS_SHIFT		(2)
+#define NVME_CTRLR_DATA_CTRATT_NVM_SETS_MASK		(0x1)
+/* supports Read Recovery Levels */
+#define NVME_CTRLR_DATA_CTRATT_READ_RECOVERY_LVLS_SHIFT	(3)
+#define NVME_CTRLR_DATA_CTRATT_READ_RECOVERY_LVLS_MASK	(0x1)
+/* supports Endurance Groups */
+#define NVME_CTRLR_DATA_CTRATT_ENDURANCE_GROUPS_SHIFT	(4)
+#define NVME_CTRLR_DATA_CTRATT_ENDURANCE_GROUPS_MASK	(0x1)
+/* supports Predictable Latency Mode */
+#define NVME_CTRLR_DATA_CTRATT_PREDICTABLE_LATENCY_SHIFT (5)
+#define NVME_CTRLR_DATA_CTRATT_PREDICTABLE_LATENCY_MASK	(0x1)
+/* supports Traffic Based Keep Alive Support */
+#define NVME_CTRLR_DATA_CTRATT_TBKAS_SHIFT		(6)
+#define NVME_CTRLR_DATA_CTRATT_TBKAS_MASK		(0x1)
+/* supports Namespace Granularity */
+#define NVME_CTRLR_DATA_CTRATT_NAMESPACE_GRANULARITY_SHIFT (7)
+#define NVME_CTRLR_DATA_CTRATT_NAMESPACE_GRANULARITY_MASK (0x1)
+/* supports SQ Associations */
+#define NVME_CTRLR_DATA_CTRATT_SQ_ASSOCIATIONS_SHIFT	(8)
+#define NVME_CTRLR_DATA_CTRATT_SQ_ASSOCIATIONS_MASK	(0x1)
+/* supports UUID List */
+#define NVME_CTRLR_DATA_CTRATT_UUID_LIST_SHIFT		(9)
+#define NVME_CTRLR_DATA_CTRATT_UUID_LIST_MASK		(0x1)
+
 /** OACS - optional admin command support */
 /* supports security send/receive commands */
 #define NVME_CTRLR_DATA_OACS_SECURITY_SHIFT		(0)