mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: zhenwei pi <pizhenwei@bytedance.com>
To: kbusch@kernel.org, hch@lst.de
Cc: sagi@grimberg.me, axboe@fb.com, linux-nvme@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	zhenwei pi <pizhenwei@bytedance.com>
Subject: [PATCH 2/3] nvme: introduce smart bits of aen cfg
Date: Sat,  7 May 2022 14:50:25 +0800	[thread overview]
Message-ID: <20220507065026.260306-3-pizhenwei@bytedance.com> (raw)
In-Reply-To: <20220507065026.260306-1-pizhenwei@bytedance.com>

According to NVM Express v1.4, Section 5.21.1.11 (Asynchronous Event
Configuration), introduce bit 0 ~ bit 5.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
---
 include/linux/nvme.h | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 882ad7523127..e9f1563ab878 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -688,10 +688,21 @@ enum {
 };
 
 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,
+	/*
+	 * NVMe SPEC 1.4: 5.21.1.11 Asynchronous Event Configuration
+	 * bits 07:00: SMART / Health Critical Warnings
+	 */
+	NVME_AEN_CFG_SMART_CRIT_SPARE		= NVME_SMART_CRIT_SPARE,
+	NVME_AEN_CFG_SMART_CRIT_TEMPERATURE	= NVME_SMART_CRIT_TEMPERATURE,
+	NVME_AEN_CFG_SMART_CRIT_RELIABILITY	= NVME_SMART_CRIT_RELIABILITY,
+	NVME_AEN_CFG_SMART_CRIT_MEDIA		= NVME_SMART_CRIT_MEDIA,
+	NVME_AEN_CFG_SMART_CRIT_VOLATILE_MEMORY	= NVME_SMART_CRIT_VOLATILE_MEMORY,
+	NVME_AEN_CFG_SMART_CRIT_PMR_UNRELIABLE	= NVME_SMART_CRIT_PMR_UNRELIABLE,
+
+	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 {
-- 
2.20.1


  parent reply	other threads:[~2022-05-07  6:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07  6:50 [PATCH 0/3] nvme: enable smart AEN zhenwei pi
2022-05-07  6:50 ` [PATCH 1/3] nvme: introduce bit 5 of smart critical warning zhenwei pi
2022-05-10  5:49   ` Christoph Hellwig
2022-05-10  6:44     ` zhenwei pi
2022-05-07  6:50 ` zhenwei pi [this message]
2022-05-07  6:50 ` [PATCH 3/3] nvme: enable smart AEN zhenwei pi
2022-05-09 12:41 ` [PATCH 0/3] " zhenwei pi
2022-05-10 19:13 ` Sagi Grimberg
2022-05-11  0:02   ` zhenwei pi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220507065026.260306-3-pizhenwei@bytedance.com \
    --to=pizhenwei@bytedance.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®