mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
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>
This commit is contained in:
committed by
Matthew Wilcox
parent
f0b50732a9
commit
1894d8f16a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user