]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/nvme.h
nvme: centralize AEN defines
[mirror_ubuntu-bionic-kernel.git] / include / linux / nvme.h
index fd1d4508a612902f08388d536704957e931f86a1..89ffa7eed2fd9dc119d036eec57d66bfa6675830 100644 (file)
@@ -90,6 +90,14 @@ enum {
 };
 
 #define NVME_AQ_DEPTH          32
+#define NVME_NR_AEN_COMMANDS   1
+#define NVME_AQ_BLK_MQ_DEPTH   (NVME_AQ_DEPTH - NVME_NR_AEN_COMMANDS)
+
+/*
+ * Subtract one to leave an empty queue entry for 'Full Queue' condition. See
+ * NVM-Express 1.2 specification, section 4.1.2.
+ */
+#define NVME_AQ_MQ_TAG_DEPTH   (NVME_AQ_BLK_MQ_DEPTH - 1)
 
 enum {
        NVME_REG_CAP    = 0x0000,       /* Controller Capabilities */