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 CCISS_DEFS_H
     20 #define CCISS_DEFS_H
     21 #include <linux/types.h>
     22 #define SENSEINFOBYTES 32
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #define CMD_SUCCESS 0x0000
     25 #define CMD_TARGET_STATUS 0x0001
     26 #define CMD_DATA_UNDERRUN 0x0002
     27 #define CMD_DATA_OVERRUN 0x0003
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define CMD_INVALID 0x0004
     30 #define CMD_PROTOCOL_ERR 0x0005
     31 #define CMD_HARDWARE_ERR 0x0006
     32 #define CMD_CONNECTION_LOST 0x0007
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define CMD_ABORTED 0x0008
     35 #define CMD_ABORT_FAILED 0x0009
     36 #define CMD_UNSOLICITED_ABORT 0x000A
     37 #define CMD_TIMEOUT 0x000B
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define CMD_UNABORTABLE 0x000C
     40 #define XFER_NONE 0x00
     41 #define XFER_WRITE 0x01
     42 #define XFER_READ 0x02
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define XFER_RSVD 0x03
     45 #define ATTR_UNTAGGED 0x00
     46 #define ATTR_SIMPLE 0x04
     47 #define ATTR_HEADOFQUEUE 0x05
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #define ATTR_ORDERED 0x06
     50 #define ATTR_ACA 0x07
     51 #define TYPE_CMD 0x00
     52 #define TYPE_MSG 0x01
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 #define BYTE __u8
     55 #define WORD __u16
     56 #define HWORD __u16
     57 #define DWORD __u32
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59 #define CISS_MAX_LUN 1024
     60 #define LEVEL2LUN 1
     61 #define LEVEL3LUN 0
     62 #pragma pack(1)
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64 typedef union _SCSI3Addr_struct {
     65  struct {
     66  BYTE Dev;
     67  BYTE Bus:6;
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69  BYTE Mode:2;
     70  } PeripDev;
     71  struct {
     72  BYTE DevLSB;
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74  BYTE DevMSB:6;
     75  BYTE Mode:2;
     76  } LogDev;
     77  struct {
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79  BYTE Dev:5;
     80  BYTE Bus:3;
     81  BYTE Targ:6;
     82  BYTE Mode:2;
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84  } LogUnit;
     85 } SCSI3Addr_struct;
     86 typedef struct _PhysDevAddr_struct {
     87  DWORD TargetId:24;
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89  DWORD Bus:6;
     90  DWORD Mode:2;
     91  SCSI3Addr_struct Target[2];
     92 } PhysDevAddr_struct;
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94 typedef struct _LogDevAddr_struct {
     95  DWORD VolId:30;
     96  DWORD Mode:2;
     97  BYTE reserved[4];
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99 } LogDevAddr_struct;
    100 typedef union _LUNAddr_struct {
    101  BYTE LunAddrBytes[8];
    102  SCSI3Addr_struct SCSI3Lun[4];
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104  PhysDevAddr_struct PhysDev;
    105  LogDevAddr_struct LogDev;
    106 } LUNAddr_struct;
    107 typedef struct _RequestBlock_struct {
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109  BYTE CDBLen;
    110  struct {
    111  BYTE Type:3;
    112  BYTE Attribute:3;
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114  BYTE Direction:2;
    115  } Type;
    116  HWORD Timeout;
    117  BYTE CDB[16];
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119 } RequestBlock_struct;
    120 typedef union _MoreErrInfo_struct{
    121  struct {
    122  BYTE Reserved[3];
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124  BYTE Type;
    125  DWORD ErrorInfo;
    126  } Common_Info;
    127  struct{
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129  BYTE Reserved[2];
    130  BYTE offense_size;
    131  BYTE offense_num;
    132  DWORD offense_value;
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134  } Invalid_Cmd;
    135 } MoreErrInfo_struct;
    136 typedef struct _ErrorInfo_struct {
    137  BYTE ScsiStatus;
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139  BYTE SenseLen;
    140  HWORD CommandStatus;
    141  DWORD ResidualCnt;
    142  MoreErrInfo_struct MoreErrInfo;
    143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    144  BYTE SenseInfo[SENSEINFOBYTES];
    145 } ErrorInfo_struct;
    146 #pragma pack()
    147 #endif
    148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    149