blob: a38eccbc5faa7cc60900f645893e04c7f18baa14 [file] [log] [blame]
Christopher Ferris60481732015-09-17 21:22:44 -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 _SCSI_GENERIC_H
20#define _SCSI_GENERIC_H
21#include <linux/compiler.h>
22typedef struct sg_iovec {
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 void __user * iov_base;
25 size_t iov_len;
26} sg_iovec_t;
27typedef struct sg_io_hdr {
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 int interface_id;
30 int dxfer_direction;
31 unsigned char cmd_len;
32 unsigned char mx_sb_len;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 unsigned short iovec_count;
35 unsigned int dxfer_len;
36 void __user * dxferp;
37 unsigned char __user * cmdp;
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 void __user * sbp;
40 unsigned int timeout;
41 unsigned int flags;
42 int pack_id;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 void __user * usr_ptr;
45 unsigned char status;
46 unsigned char masked_status;
47 unsigned char msg_status;
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 unsigned char sb_len_wr;
50 unsigned short host_status;
51 unsigned short driver_status;
52 int resid;
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 unsigned int duration;
55 unsigned int info;
56} sg_io_hdr_t;
57#define SG_INTERFACE_ID_ORIG 'S'
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define SG_DXFER_NONE (- 1)
60#define SG_DXFER_TO_DEV (- 2)
61#define SG_DXFER_FROM_DEV (- 3)
62#define SG_DXFER_TO_FROM_DEV (- 4)
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define SG_DXFER_UNKNOWN (- 5)
65#define SG_FLAG_DIRECT_IO 1
66#define SG_FLAG_UNUSED_LUN_INHIBIT 2
67#define SG_FLAG_MMAP_IO 4
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define SG_FLAG_NO_DXFER 0x10000
70#define SG_FLAG_Q_AT_TAIL 0x10
71#define SG_FLAG_Q_AT_HEAD 0x20
72#define SG_INFO_OK_MASK 0x1
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define SG_INFO_OK 0x0
75#define SG_INFO_CHECK 0x1
76#define SG_INFO_DIRECT_IO_MASK 0x6
77#define SG_INFO_INDIRECT_IO 0x0
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define SG_INFO_DIRECT_IO 0x2
80#define SG_INFO_MIXED_IO 0x4
81typedef struct sg_scsi_id {
82 int host_no;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 int channel;
85 int scsi_id;
86 int lun;
87 int scsi_type;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 short h_cmd_per_lun;
90 short d_queue_depth;
91 int unused[2];
92} sg_scsi_id_t;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94typedef struct sg_req_info {
95 char req_state;
96 char orphan;
97 char sg_io_owned;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 char problem;
100 int pack_id;
101 void __user * usr_ptr;
102 unsigned int duration;
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 int unused;
105} sg_req_info_t;
106#define SG_EMULATED_HOST 0x2203
107#define SG_SET_TRANSFORM 0x2204
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define SG_GET_TRANSFORM 0x2205
110#define SG_SET_RESERVED_SIZE 0x2275
111#define SG_GET_RESERVED_SIZE 0x2272
112#define SG_GET_SCSI_ID 0x2276
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define SG_SET_FORCE_LOW_DMA 0x2279
115#define SG_GET_LOW_DMA 0x227a
116#define SG_SET_FORCE_PACK_ID 0x227b
117#define SG_GET_PACK_ID 0x227c
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119#define SG_GET_NUM_WAITING 0x227d
120#define SG_GET_SG_TABLESIZE 0x227F
121#define SG_GET_VERSION_NUM 0x2282
122#define SG_SCSI_RESET 0x2284
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124#define SG_SCSI_RESET_NOTHING 0
125#define SG_SCSI_RESET_DEVICE 1
126#define SG_SCSI_RESET_BUS 2
127#define SG_SCSI_RESET_HOST 3
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129#define SG_SCSI_RESET_TARGET 4
130#define SG_IO 0x2285
131#define SG_GET_REQUEST_TABLE 0x2286
132#define SG_SET_KEEP_ORPHAN 0x2287
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define SG_GET_KEEP_ORPHAN 0x2288
135#define SG_GET_ACCESS_COUNT 0x2289
136#define SG_SCATTER_SZ (8 * 4096)
137#define SG_DEFAULT_RETRIES 0
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#define SG_DEF_FORCE_LOW_DMA 0
140#define SG_DEF_FORCE_PACK_ID 0
141#define SG_DEF_KEEP_ORPHAN 0
142#define SG_DEF_RESERVED_SIZE SG_SCATTER_SZ
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144#define SG_MAX_QUEUE 16
145#define SG_BIG_BUFF SG_DEF_RESERVED_SIZE
146typedef struct sg_io_hdr Sg_io_hdr;
147typedef struct sg_io_vec Sg_io_vec;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149typedef struct sg_scsi_id Sg_scsi_id;
150typedef struct sg_req_info Sg_req_info;
151#define SG_MAX_SENSE 16
152struct sg_header {
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 int pack_len;
155 int reply_len;
156 int pack_id;
157 int result;
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 unsigned int twelve_byte : 1;
160 unsigned int target_status : 5;
161 unsigned int host_status : 8;
162 unsigned int driver_status : 8;
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 unsigned int other_flags : 10;
165 unsigned char sense_buffer[SG_MAX_SENSE];
166};
167#define SG_SET_TIMEOUT 0x2201
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169#define SG_GET_TIMEOUT 0x2202
170#define SG_GET_COMMAND_Q 0x2270
171#define SG_SET_COMMAND_Q 0x2271
172#define SG_SET_DEBUG 0x227e
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174#define SG_NEXT_CMD_LEN 0x2283
175#define SG_DEFAULT_TIMEOUT (60 * HZ)
176#define SG_DEF_COMMAND_Q 0
177#define SG_DEF_UNDERRUN_FLAG 0
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179#endif