summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKeith Busch2013-12-10 21:10:38 +0100
committerMatthew Wilcox2014-01-28 01:27:53 +0100
commitc30341dc3c436cf43508cd44cdfbb3810c38c195 (patch)
tree36759f0401b539717d738d1c4548b2a2b18172e1 /include
parentNVMe: Schedule reset for failed controllers (diff)
downloadkernel-qcow2-linux-c30341dc3c436cf43508cd44cdfbb3810c38c195.tar.gz
kernel-qcow2-linux-c30341dc3c436cf43508cd44cdfbb3810c38c195.tar.xz
kernel-qcow2-linux-c30341dc3c436cf43508cd44cdfbb3810c38c195.zip
NVMe: Abort timed out commands
Send nvme abort command to io requests that have timed out on an initialized device. If the command is not returned after another timeout, schedule the controller for reset. Signed-off-by: Keith Busch <keith.busch@intel.com> [fix endianness issues] Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nvme.h1
-rw-r--r--include/uapi/linux/nvme.h11
2 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 117d877e8be5..69ae03f6eb15 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -95,6 +95,7 @@ struct nvme_dev {
u32 max_hw_sectors;
u32 stripe_size;
u16 oncs;
+ u16 abort_limit;
u8 initialized;
};
diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index 989c04e0c563..e5ab62201119 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -350,6 +350,16 @@ struct nvme_delete_queue {
__u32 rsvd11[5];
};
+struct nvme_abort_cmd {
+ __u8 opcode;
+ __u8 flags;
+ __u16 command_id;
+ __u32 rsvd1[9];
+ __le16 sqid;
+ __u16 cid;
+ __u32 rsvd11[5];
+};
+
struct nvme_download_firmware {
__u8 opcode;
__u8 flags;
@@ -384,6 +394,7 @@ struct nvme_command {
struct nvme_download_firmware dlfw;
struct nvme_format_cmd format;
struct nvme_dsm_cmd dsm;
+ struct nvme_abort_cmd abort;
};
};