summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/nvme.h
diff options
context:
space:
mode:
authorKeith Busch2015-06-05 18:30:08 +0200
committerJens Axboe2015-06-05 18:30:08 +0200
commit4cc06521ee1f153e0d292413a5bff7bbbdee92d0 (patch)
treedc984fc9b1a477b77f072271a9630b35b7dbdd58 /include/uapi/linux/nvme.h
parentnull_blk: restart request processing on completion handler (diff)
downloadkernel-qcow2-linux-4cc06521ee1f153e0d292413a5bff7bbbdee92d0.tar.gz
kernel-qcow2-linux-4cc06521ee1f153e0d292413a5bff7bbbdee92d0.tar.xz
kernel-qcow2-linux-4cc06521ee1f153e0d292413a5bff7bbbdee92d0.zip
NVMe: add sysfs and ioctl controller reset
We need the ability to perform an nvme controller reset as discussed on the mailing list thread: http://lists.infradead.org/pipermail/linux-nvme/2015-March/001585.html This adds a sysfs entry that when written to will reset perform an NVMe controller reset if the controller was successfully initialized in the first place. This also adds locking around resetting the device in the async probe method so the driver can't schedule two resets. Signed-off-by: Keith Busch <keith.busch@intel.com> Cc: Brandon Schultz <brandon.schulz@hgst.com> Cc: David Sariel <david.sariel@pmcs.com> Updated by Jens to: 1) Merge this with the ioctl reset patch from David Sariel. The ioctl path now shares the reset code from the sysfs path. 2) Don't flush work if we fail issuing the reset. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/uapi/linux/nvme.h')
-rw-r--r--include/uapi/linux/nvme.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index aef9a81b2d75..b660dc2fadfb 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -579,5 +579,6 @@ struct nvme_passthru_cmd {
#define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd)
#define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io)
#define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd)
+#define NVME_IOCTL_RESET _IO('N', 0x44)
#endif /* _UAPI_LINUX_NVME_H */