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 __TARGET_CORE_USER_H 20 #define __TARGET_CORE_USER_H 21 #include <linux/types.h> 22 #include <linux/uio.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #define TCMU_VERSION "2.0" 25 #define TCMU_MAILBOX_VERSION 2 26 #define ALIGN_SIZE 64 27 struct tcmu_mailbox { 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 __u16 version; 30 __u16 flags; 31 __u32 cmdr_off; 32 __u32 cmdr_size; 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 __u32 cmd_head; 35 __u32 cmd_tail __attribute__((__aligned__(ALIGN_SIZE))); 36 } __packed; 37 enum tcmu_opcode { 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 TCMU_OP_PAD = 0, 40 TCMU_OP_CMD, 41 }; 42 struct tcmu_cmd_entry_hdr { 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 __u32 len_op; 45 __u16 cmd_id; 46 __u8 kflags; 47 #define TCMU_UFLAG_UNKNOWN_OP 0x1 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 __u8 uflags; 50 } __packed; 51 #define TCMU_OP_MASK 0x7 52 #define TCMU_SENSE_BUFFERSIZE 96 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 struct tcmu_cmd_entry { 55 struct tcmu_cmd_entry_hdr hdr; 56 union { 57 struct { 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 uint32_t iov_cnt; 60 uint32_t iov_bidi_cnt; 61 uint32_t iov_dif_cnt; 62 uint64_t cdb_off; 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 uint64_t __pad1; 65 uint64_t __pad2; 66 struct iovec iov[0]; 67 } req; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 struct { 70 uint8_t scsi_status; 71 uint8_t __pad1; 72 uint16_t __pad2; 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 uint32_t __pad3; 75 char sense_buffer[TCMU_SENSE_BUFFERSIZE]; 76 } rsp; 77 }; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 } __packed; 80 #define TCMU_OP_ALIGN_SIZE sizeof(uint64_t) 81 enum tcmu_genl_cmd { 82 TCMU_CMD_UNSPEC, 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 TCMU_CMD_ADDED_DEVICE, 85 TCMU_CMD_REMOVED_DEVICE, 86 __TCMU_CMD_MAX, 87 }; 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define TCMU_CMD_MAX (__TCMU_CMD_MAX - 1) 90 enum tcmu_genl_attr { 91 TCMU_ATTR_UNSPEC, 92 TCMU_ATTR_DEVICE, 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 TCMU_ATTR_MINOR, 95 __TCMU_ATTR_MAX, 96 }; 97 #define TCMU_ATTR_MAX (__TCMU_ATTR_MAX - 1) 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 #endif 100