1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _UAPI_LINUX_NVME_IOCTL_H 20 #define _UAPI_LINUX_NVME_IOCTL_H 21 #include <linux/types.h> 22 struct nvme_user_io { 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 __u8 opcode; 25 __u8 flags; 26 __u16 control; 27 __u16 nblocks; 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 __u16 rsvd; 30 __u64 metadata; 31 __u64 addr; 32 __u64 slba; 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 __u32 dsmgmt; 35 __u32 reftag; 36 __u16 apptag; 37 __u16 appmask; 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 }; 40 struct nvme_passthru_cmd { 41 __u8 opcode; 42 __u8 flags; 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 __u16 rsvd1; 45 __u32 nsid; 46 __u32 cdw2; 47 __u32 cdw3; 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 __u64 metadata; 50 __u64 addr; 51 __u32 metadata_len; 52 __u32 data_len; 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 __u32 cdw10; 55 __u32 cdw11; 56 __u32 cdw12; 57 __u32 cdw13; 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 __u32 cdw14; 60 __u32 cdw15; 61 __u32 timeout_ms; 62 __u32 result; 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 }; 65 #define nvme_admin_cmd nvme_passthru_cmd 66 #define NVME_IOCTL_ID _IO('N', 0x40) 67 #define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd) 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) 70 #define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd) 71 #define NVME_IOCTL_RESET _IO('N', 0x44) 72 #define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45) 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define NVME_IOCTL_RESCAN _IO('N', 0x46) 75 #endif 76