nvmet: add defines for discovery change async events
authorJay Sternberg <jay.e.sternberg@intel.com>
Mon, 12 Nov 2018 21:56:37 +0000 (13:56 -0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Dec 2018 05:26:56 +0000 (22:26 -0700)
Add AEN/AER values as defined by the specification

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/nvmet.h
include/linux/nvme.h

index a8ee265a3806e20d475c8aed993c24c55e2cd0f6..bc99c700a5834ff0b92875e9a55084f66fdfa2f0 100644 (file)
@@ -36,6 +36,8 @@
  */
 #define NVMET_AEN_CFG_OPTIONAL \
        (NVME_AEN_CFG_NS_ATTR | NVME_AEN_CFG_ANA_CHANGE)
+#define NVMET_DISC_AEN_CFG_OPTIONAL \
+       (NVME_AEN_CFG_DISC_CHANGE)
 
 /*
  * Plus mandatory SMART AENs (we'll never send them, but allow enabling them):
index d6cfa194be802bd137d8d4c928ae038d67322def..77d320d32ee55979ed0f6b8597439f0e66d9e09e 100644 (file)
@@ -486,18 +486,21 @@ enum {
        NVME_AER_NOTICE_NS_CHANGED      = 0x00,
        NVME_AER_NOTICE_FW_ACT_STARTING = 0x01,
        NVME_AER_NOTICE_ANA             = 0x03,
+       NVME_AER_NOTICE_DISC_CHANGED    = 0xf0,
 };
 
 enum {
        NVME_AEN_BIT_NS_ATTR            = 8,
        NVME_AEN_BIT_FW_ACT             = 9,
        NVME_AEN_BIT_ANA_CHANGE         = 11,
+       NVME_AEN_BIT_DISC_CHANGE        = 31,
 };
 
 enum {
        NVME_AEN_CFG_NS_ATTR            = 1 << NVME_AEN_BIT_NS_ATTR,
        NVME_AEN_CFG_FW_ACT             = 1 << NVME_AEN_BIT_FW_ACT,
        NVME_AEN_CFG_ANA_CHANGE         = 1 << NVME_AEN_BIT_ANA_CHANGE,
+       NVME_AEN_CFG_DISC_CHANGE        = 1 << NVME_AEN_BIT_DISC_CHANGE,
 };
 
 struct nvme_lba_range_type {