aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2013-07-15 15:02:22 -0600
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2013-09-03 16:40:32 -0400
commit1894d8f16afe5ad54b732f0fa6c4e80bd4d40b91 (patch)
treef1451bcf63fc1ddc60b10ba0f502029da1119e7e /include/linux/nvme.h
parentNVMe: Separate controller init from disk discovery (diff)
downloadlinux-dev-1894d8f16afe5ad54b732f0fa6c4e80bd4d40b91.tar.xz
linux-dev-1894d8f16afe5ad54b732f0fa6c4e80bd4d40b91.zip
NVMe: Use normal shutdown
The NVMe spec recommends using the shutdown normal sequence when safely taking the controller offline instead of hitting CC.EN on the next start-up to reset the controller. The spec recommends a minimum of 1 second for the shutdown complete. This patch waits 2 seconds to be on the safe side. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 3403c8f06fa0..26ebcf41c213 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -53,6 +53,7 @@ enum {
NVME_CC_SHN_NONE = 0 << 14,
NVME_CC_SHN_NORMAL = 1 << 14,
NVME_CC_SHN_ABRUPT = 2 << 14,
+ NVME_CC_SHN_MASK = 3 << 14,
NVME_CC_IOSQES = 6 << 16,
NVME_CC_IOCQES = 4 << 20,
NVME_CSTS_RDY = 1 << 0,
@@ -60,6 +61,7 @@ enum {
NVME_CSTS_SHST_NORMAL = 0 << 2,
NVME_CSTS_SHST_OCCUR = 1 << 2,
NVME_CSTS_SHST_CMPLT = 2 << 2,
+ NVME_CSTS_SHST_MASK = 3 << 2,
};
#define NVME_VS(major, minor) (major << 16 | minor)