blob: af075f8a9ead8706f67839c6fe878dc97ef97aec [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 */
64typedef union _SCSI3Addr_struct {
Tao Baod7db5942015-01-28 10:07:51 -080065 struct {
66 BYTE Dev;
67 BYTE Bus : 6;
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 BYTE Mode : 2;
70 } PeripDev;
71 struct {
72 BYTE DevLSB;
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 BYTE DevMSB : 6;
75 BYTE Mode : 2;
76 } LogDev;
77 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 BYTE Dev : 5;
80 BYTE Bus : 3;
81 BYTE Targ : 6;
82 BYTE Mode : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 } LogUnit;
Ben Cheng655a7c02013-10-16 16:09:24 -070085} SCSI3Addr_struct;
86typedef struct _PhysDevAddr_struct {
Tao Baod7db5942015-01-28 10:07:51 -080087 DWORD TargetId : 24;
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 DWORD Bus : 6;
90 DWORD Mode : 2;
91 SCSI3Addr_struct Target[2];
Ben Cheng655a7c02013-10-16 16:09:24 -070092} PhysDevAddr_struct;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94typedef struct _LogDevAddr_struct {
Tao Baod7db5942015-01-28 10:07:51 -080095 DWORD VolId : 30;
96 DWORD Mode : 2;
97 BYTE reserved[4];
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99} LogDevAddr_struct;
100typedef union _LUNAddr_struct {
Tao Baod7db5942015-01-28 10:07:51 -0800101 BYTE LunAddrBytes[8];
102 SCSI3Addr_struct SCSI3Lun[4];
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 PhysDevAddr_struct PhysDev;
105 LogDevAddr_struct LogDev;
Ben Cheng655a7c02013-10-16 16:09:24 -0700106} LUNAddr_struct;
107typedef struct _RequestBlock_struct {
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 BYTE CDBLen;
110 struct {
111 BYTE Type : 3;
112 BYTE Attribute : 3;
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114 BYTE Direction : 2;
115 } Type;
116 HWORD Timeout;
117 BYTE CDB[16];
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119} RequestBlock_struct;
Tao Baod7db5942015-01-28 10:07:51 -0800120typedef union _MoreErrInfo_struct {
121 struct {
122 BYTE Reserved[3];
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 BYTE Type;
125 DWORD ErrorInfo;
126 } Common_Info;
127 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 BYTE Reserved[2];
130 BYTE offense_size;
131 BYTE offense_num;
132 DWORD offense_value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 } Invalid_Cmd;
Ben Cheng655a7c02013-10-16 16:09:24 -0700135} MoreErrInfo_struct;
136typedef struct _ErrorInfo_struct {
Tao Baod7db5942015-01-28 10:07:51 -0800137 BYTE ScsiStatus;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139 BYTE SenseLen;
140 HWORD CommandStatus;
141 DWORD ResidualCnt;
142 MoreErrInfo_struct MoreErrInfo;
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 BYTE SenseInfo[SENSEINFOBYTES];
Ben Cheng655a7c02013-10-16 16:09:24 -0700145} ErrorInfo_struct;
146#pragma pack()
147#endif
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */