aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorVishal Verma <vishal.l.verma@intel.com>2013-03-27 07:13:41 -0400
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2013-03-27 07:17:49 -0400
commitf8ebf8409abfdaeeb8c847381629a2a8b8e3d816 (patch)
tree718ed21ac7182a75aab76eca6421da184edf0618 /include/linux/nvme.h
parent13c3b0fcc8e33ba49f252378f6e7290b146042af (diff)
NVMe: Add definitions for format command
The SCSI emulation has the ability to send format commands, so we need to add the definition of the command. Also add a missing error code. Signed-off-by: Vishal Verma <vishal.l.verma@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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 6f899add14ab..f1974cab60cf 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -393,6 +393,16 @@ struct nvme_download_firmware {
393 __u32 rsvd12[4]; 393 __u32 rsvd12[4];
394}; 394};
395 395
396struct nvme_format_cmd {
397 __u8 opcode;
398 __u8 flags;
399 __u16 command_id;
400 __le32 nsid;
401 __u64 rsvd2[4];
402 __le32 cdw10;
403 __u32 rsvd11[5];
404};
405
396struct nvme_command { 406struct nvme_command {
397 union { 407 union {
398 struct nvme_common_command common; 408 struct nvme_common_command common;
@@ -403,6 +413,7 @@ struct nvme_command {
403 struct nvme_create_sq create_sq; 413 struct nvme_create_sq create_sq;
404 struct nvme_delete_queue delete_queue; 414 struct nvme_delete_queue delete_queue;
405 struct nvme_download_firmware dlfw; 415 struct nvme_download_firmware dlfw;
416 struct nvme_format_cmd format;
406 struct nvme_dsm_cmd dsm; 417 struct nvme_dsm_cmd dsm;
407 }; 418 };
408}; 419};
@@ -420,6 +431,7 @@ enum {
420 NVME_SC_FUSED_FAIL = 0x9, 431 NVME_SC_FUSED_FAIL = 0x9,
421 NVME_SC_FUSED_MISSING = 0xa, 432 NVME_SC_FUSED_MISSING = 0xa,
422 NVME_SC_INVALID_NS = 0xb, 433 NVME_SC_INVALID_NS = 0xb,
434 NVME_SC_CMD_SEQ_ERROR = 0xc,
423 NVME_SC_LBA_RANGE = 0x80, 435 NVME_SC_LBA_RANGE = 0x80,
424 NVME_SC_CAP_EXCEEDED = 0x81, 436 NVME_SC_CAP_EXCEEDED = 0x81,
425 NVME_SC_NS_NOT_READY = 0x82, 437 NVME_SC_NS_NOT_READY = 0x82,