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