hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/uapi/linux/nvme_ioctl.h
....@@ -2,15 +2,6 @@
22 /*
33 * Definitions for the NVM Express ioctl interface
44 * Copyright (c) 2011-2014, Intel Corporation.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
145 */
156
167 #ifndef _UAPI_LINUX_NVME_IOCTL_H
....@@ -54,6 +45,28 @@
5445 __u32 result;
5546 };
5647
48
+struct 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
+ __u32 rsvd2;
67
+ __u64 result;
68
+};
69
+
5770 #define nvme_admin_cmd nvme_passthru_cmd
5871
5972 #define NVME_IOCTL_ID _IO('N', 0x40)
....@@ -63,5 +76,7 @@
6376 #define NVME_IOCTL_RESET _IO('N', 0x44)
6477 #define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45)
6578 #define NVME_IOCTL_RESCAN _IO('N', 0x46)
79
+#define NVME_IOCTL_ADMIN64_CMD _IOWR('N', 0x47, struct nvme_passthru_cmd64)
80
+#define NVME_IOCTL_IO64_CMD _IOWR('N', 0x48, struct nvme_passthru_cmd64)
6681
6782 #endif /* _UAPI_LINUX_NVME_IOCTL_H */