aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorMarta Rybczynska <mrybczyn@kalray.eu>2019-09-24 09:14:52 -0400
committerSagi Grimberg <sagi@grimberg.me>2019-09-25 15:53:27 -0400
commit65e68edce0db433aa0c2b26d7dc14fbbbeb89fbb (patch)
tree13a641114ef425197135ba4580c2007e1ac86e16 /include/uapi
parent19ea025e1d28c629b369c3532a85b3df478cc5c6 (diff)
nvme: allow 64-bit results in passthru commands
It is not possible to get 64-bit results from the passthru commands, what prevents from getting for the Capabilities (CAP) property value. As a result, it is not possible to implement IOL's NVMe Conformance test 4.3 Case 1 for Fabrics targets [1] (page 123). This issue has been already discussed [2], but without a solution. This patch solves the problem by adding new ioctls with a new passthru structure, including 64-bit results. The older ioctls stay unchanged. [1] https://www.iol.unh.edu/sites/default/files/testsuites/nvme/UNH-IOL_NVMe_Conformance_Test_Suite_v11.0.pdf [2] http://lists.infradead.org/pipermail/linux-nvme/2018-June/018791.html Signed-off-by: Marta Rybczynska <marta.rybczynska@kalray.eu> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/nvme_ioctl.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/uapi/linux/nvme_ioctl.h b/include/uapi/linux/nvme_ioctl.h
index 1c215ea1798e..e168dc59e9a0 100644
--- a/include/uapi/linux/nvme_ioctl.h
+++ b/include/uapi/linux/nvme_ioctl.h
@@ -45,6 +45,27 @@ struct nvme_passthru_cmd {
45 __u32 result; 45 __u32 result;
46}; 46};
47 47
48struct nvme_passthru_cmd64 {
49 __u8 opcode;
50 __u8 flags;
51 __u16 rsvd1;
52 __u32 nsid;
53 __u32 cdw2;
54 __u32 cdw3;
55 __u64 metadata;
56 __u64 addr;
57 __u32 metadata_len;
58 __u32 data_len;
59 __u32 cdw10;
60 __u32 cdw11;
61 __u32 cdw12;
62 __u32 cdw13;
63 __u32 cdw14;
64 __u32 cdw15;
65 __u32 timeout_ms;
66 __u64 result;
67};
68
48#define nvme_admin_cmd nvme_passthru_cmd 69#define nvme_admin_cmd nvme_passthru_cmd
49 70
50#define NVME_IOCTL_ID _IO('N', 0x40) 71#define NVME_IOCTL_ID _IO('N', 0x40)
@@ -54,5 +75,7 @@ struct nvme_passthru_cmd {
54#define NVME_IOCTL_RESET _IO('N', 0x44) 75#define NVME_IOCTL_RESET _IO('N', 0x44)
55#define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45) 76#define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45)
56#define NVME_IOCTL_RESCAN _IO('N', 0x46) 77#define NVME_IOCTL_RESCAN _IO('N', 0x46)
78#define NVME_IOCTL_ADMIN64_CMD _IOWR('N', 0x47, struct nvme_passthru_cmd64)
79#define NVME_IOCTL_IO64_CMD _IOWR('N', 0x48, struct nvme_passthru_cmd64)
57 80
58#endif /* _UAPI_LINUX_NVME_IOCTL_H */ 81#endif /* _UAPI_LINUX_NVME_IOCTL_H */