aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-13 17:22:26 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-13 17:22:26 -0500
commit9ea18f8cab5f1c36cdd0f09717e35ceb48c36a87 (patch)
tree0c8da7ac47cb59fe39f177ab0407f554aff77194 /include/uapi/linux
parentcaf292ae5bb9d57198ce001d8b762f7abae3a94d (diff)
parent849c6e7746e4f6317ace6aa7d2fcdcd844e99ddb (diff)
Merge branch 'for-3.19/drivers' of git://git.kernel.dk/linux-block
Pull block layer driver updates from Jens Axboe: - NVMe updates: - The blk-mq conversion from Matias (and others) - A stack of NVMe bug fixes from the nvme tree, mostly from Keith. - Various bug fixes from me, fixing issues in both the blk-mq conversion and generic bugs. - Abort and CPU online fix from Sam. - Hot add/remove fix from Indraneel. - A couple of drbd fixes from the drbd team (Andreas, Lars, Philipp) - With the generic IO stat accounting from 3.19/core, converting md, bcache, and rsxx to use those. From Gu Zheng. - Boundary check for queue/irq mode for null_blk from Matias. Fixes cases where invalid values could be given, causing the device to hang. - The xen blkfront pull request, with two bug fixes from Vitaly. * 'for-3.19/drivers' of git://git.kernel.dk/linux-block: (56 commits) NVMe: fix race condition in nvme_submit_sync_cmd() NVMe: fix retry/error logic in nvme_queue_rq() NVMe: Fix FS mount issue (hot-remove followed by hot-add) NVMe: fix error return checking from blk_mq_alloc_request() NVMe: fix freeing of wrong request in abort path xen/blkfront: remove redundant flush_op xen/blkfront: improve protection against issuing unsupported REQ_FUA NVMe: Fix command setup on IO retry null_blk: boundary check queue_mode and irqmode block/rsxx: use generic io stats accounting functions to simplify io stat accounting md: use generic io stats accounting functions to simplify io stat accounting drbd: use generic io stats accounting functions to simplify io stat accounting md/bcache: use generic io stats accounting functions to simplify io stat accounting NVMe: Update module version major number NVMe: fail pci initialization if the device doesn't have any BARs NVMe: add ->exit_hctx() hook NVMe: make setup work for devices that don't do INTx NVMe: enable IO stats by default NVMe: nvme_submit_async_admin_req() must use atomic rq allocation NVMe: replace blk_put_request() with blk_mq_free_request() ...
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/nvme.h46
1 files changed, 44 insertions, 2 deletions
diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index 29a7d8619d8d..26386cf3db44 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -181,6 +181,22 @@ enum {
181 NVME_LBART_ATTRIB_HIDE = 1 << 1, 181 NVME_LBART_ATTRIB_HIDE = 1 << 1,
182}; 182};
183 183
184struct nvme_reservation_status {
185 __le32 gen;
186 __u8 rtype;
187 __u8 regctl[2];
188 __u8 resv5[2];
189 __u8 ptpls;
190 __u8 resv10[13];
191 struct {
192 __le16 cntlid;
193 __u8 rcsts;
194 __u8 resv3[5];
195 __le64 hostid;
196 __le64 rkey;
197 } regctl_ds[];
198};
199
184/* I/O commands */ 200/* I/O commands */
185 201
186enum nvme_opcode { 202enum nvme_opcode {
@@ -189,7 +205,12 @@ enum nvme_opcode {
189 nvme_cmd_read = 0x02, 205 nvme_cmd_read = 0x02,
190 nvme_cmd_write_uncor = 0x04, 206 nvme_cmd_write_uncor = 0x04,
191 nvme_cmd_compare = 0x05, 207 nvme_cmd_compare = 0x05,
208 nvme_cmd_write_zeroes = 0x08,
192 nvme_cmd_dsm = 0x09, 209 nvme_cmd_dsm = 0x09,
210 nvme_cmd_resv_register = 0x0d,
211 nvme_cmd_resv_report = 0x0e,
212 nvme_cmd_resv_acquire = 0x11,
213 nvme_cmd_resv_release = 0x15,
193}; 214};
194 215
195struct nvme_common_command { 216struct nvme_common_command {
@@ -305,7 +326,11 @@ enum {
305 NVME_FEAT_IRQ_CONFIG = 0x09, 326 NVME_FEAT_IRQ_CONFIG = 0x09,
306 NVME_FEAT_WRITE_ATOMIC = 0x0a, 327 NVME_FEAT_WRITE_ATOMIC = 0x0a,
307 NVME_FEAT_ASYNC_EVENT = 0x0b, 328 NVME_FEAT_ASYNC_EVENT = 0x0b,
308 NVME_FEAT_SW_PROGRESS = 0x0c, 329 NVME_FEAT_AUTO_PST = 0x0c,
330 NVME_FEAT_SW_PROGRESS = 0x80,
331 NVME_FEAT_HOST_ID = 0x81,
332 NVME_FEAT_RESV_MASK = 0x82,
333 NVME_FEAT_RESV_PERSIST = 0x83,
309 NVME_LOG_ERROR = 0x01, 334 NVME_LOG_ERROR = 0x01,
310 NVME_LOG_SMART = 0x02, 335 NVME_LOG_SMART = 0x02,
311 NVME_LOG_FW_SLOT = 0x03, 336 NVME_LOG_FW_SLOT = 0x03,
@@ -440,9 +465,15 @@ enum {
440 NVME_SC_FUSED_MISSING = 0xa, 465 NVME_SC_FUSED_MISSING = 0xa,
441 NVME_SC_INVALID_NS = 0xb, 466 NVME_SC_INVALID_NS = 0xb,
442 NVME_SC_CMD_SEQ_ERROR = 0xc, 467 NVME_SC_CMD_SEQ_ERROR = 0xc,
468 NVME_SC_SGL_INVALID_LAST = 0xd,
469 NVME_SC_SGL_INVALID_COUNT = 0xe,
470 NVME_SC_SGL_INVALID_DATA = 0xf,
471 NVME_SC_SGL_INVALID_METADATA = 0x10,
472 NVME_SC_SGL_INVALID_TYPE = 0x11,
443 NVME_SC_LBA_RANGE = 0x80, 473 NVME_SC_LBA_RANGE = 0x80,
444 NVME_SC_CAP_EXCEEDED = 0x81, 474 NVME_SC_CAP_EXCEEDED = 0x81,
445 NVME_SC_NS_NOT_READY = 0x82, 475 NVME_SC_NS_NOT_READY = 0x82,
476 NVME_SC_RESERVATION_CONFLICT = 0x83,
446 NVME_SC_CQ_INVALID = 0x100, 477 NVME_SC_CQ_INVALID = 0x100,
447 NVME_SC_QID_INVALID = 0x101, 478 NVME_SC_QID_INVALID = 0x101,
448 NVME_SC_QUEUE_SIZE = 0x102, 479 NVME_SC_QUEUE_SIZE = 0x102,
@@ -454,7 +485,15 @@ enum {
454 NVME_SC_INVALID_VECTOR = 0x108, 485 NVME_SC_INVALID_VECTOR = 0x108,
455 NVME_SC_INVALID_LOG_PAGE = 0x109, 486 NVME_SC_INVALID_LOG_PAGE = 0x109,
456 NVME_SC_INVALID_FORMAT = 0x10a, 487 NVME_SC_INVALID_FORMAT = 0x10a,
488 NVME_SC_FIRMWARE_NEEDS_RESET = 0x10b,
489 NVME_SC_INVALID_QUEUE = 0x10c,
490 NVME_SC_FEATURE_NOT_SAVEABLE = 0x10d,
491 NVME_SC_FEATURE_NOT_CHANGEABLE = 0x10e,
492 NVME_SC_FEATURE_NOT_PER_NS = 0x10f,
493 NVME_SC_FW_NEEDS_RESET_SUBSYS = 0x110,
457 NVME_SC_BAD_ATTRIBUTES = 0x180, 494 NVME_SC_BAD_ATTRIBUTES = 0x180,
495 NVME_SC_INVALID_PI = 0x181,
496 NVME_SC_READ_ONLY = 0x182,
458 NVME_SC_WRITE_FAULT = 0x280, 497 NVME_SC_WRITE_FAULT = 0x280,
459 NVME_SC_READ_ERROR = 0x281, 498 NVME_SC_READ_ERROR = 0x281,
460 NVME_SC_GUARD_CHECK = 0x282, 499 NVME_SC_GUARD_CHECK = 0x282,
@@ -489,7 +528,7 @@ struct nvme_user_io {
489 __u16 appmask; 528 __u16 appmask;
490}; 529};
491 530
492struct nvme_admin_cmd { 531struct nvme_passthru_cmd {
493 __u8 opcode; 532 __u8 opcode;
494 __u8 flags; 533 __u8 flags;
495 __u16 rsvd1; 534 __u16 rsvd1;
@@ -510,8 +549,11 @@ struct nvme_admin_cmd {
510 __u32 result; 549 __u32 result;
511}; 550};
512 551
552#define nvme_admin_cmd nvme_passthru_cmd
553
513#define NVME_IOCTL_ID _IO('N', 0x40) 554#define NVME_IOCTL_ID _IO('N', 0x40)
514#define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd) 555#define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd)
515#define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) 556#define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io)
557#define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd)
516 558
517#endif /* _UAPI_LINUX_NVME_H */ 559#endif /* _UAPI_LINUX_NVME_H */