Go to the documentation of this file. 1 #ifndef _SCSI_GENERIC_H
2 #define _SCSI_GENERIC_H
4 #include <linux/compiler.h>
113 #define SG_INTERFACE_ID_ORIG 'S'
116 #define SG_DXFER_NONE (-1)
117 #define SG_DXFER_TO_DEV (-2)
118 #define SG_DXFER_FROM_DEV (-3)
119 #define SG_DXFER_TO_FROM_DEV (-4)
123 #define SG_DXFER_UNKNOWN (-5)
126 #define SG_FLAG_DIRECT_IO 1
127 #define SG_FLAG_UNUSED_LUN_INHIBIT 2
129 #define SG_FLAG_MMAP_IO 4
130 #define SG_FLAG_NO_DXFER 0x10000
134 #define SG_INFO_OK_MASK 0x1
135 #define SG_INFO_OK 0x0
136 #define SG_INFO_CHECK 0x1
138 #define SG_INFO_DIRECT_IO_MASK 0x6
139 #define SG_INFO_INDIRECT_IO 0x0
140 #define SG_INFO_DIRECT_IO 0x2
141 #define SG_INFO_MIXED_IO 0x4
172 #define SG_EMULATED_HOST 0x2203
176 #define SG_SET_TRANSFORM 0x2204
178 #define SG_GET_TRANSFORM 0x2205
180 #define SG_SET_RESERVED_SIZE 0x2275
181 #define SG_GET_RESERVED_SIZE 0x2272
184 #define SG_GET_SCSI_ID 0x2276
188 #define SG_SET_FORCE_LOW_DMA 0x2279
189 #define SG_GET_LOW_DMA 0x227a
195 #define SG_SET_FORCE_PACK_ID 0x227b
196 #define SG_GET_PACK_ID 0x227c
198 #define SG_GET_NUM_WAITING 0x227d
201 #define SG_GET_SG_TABLESIZE 0x227F
203 #define SG_GET_VERSION_NUM 0x2282
206 #define SG_SCSI_RESET 0x2284
208 #define SG_SCSI_RESET_NOTHING 0
209 #define SG_SCSI_RESET_DEVICE 1
210 #define SG_SCSI_RESET_BUS 2
211 #define SG_SCSI_RESET_HOST 3
212 #define SG_SCSI_RESET_TARGET 4
217 #define SG_GET_REQUEST_TABLE 0x2286
220 #define SG_SET_KEEP_ORPHAN 0x2287
221 #define SG_GET_KEEP_ORPHAN 0x2288
224 #define SG_GET_ACCESS_COUNT 0x2289
227 #define SG_SCATTER_SZ (8 * 4096)
234 #define SG_DEFAULT_RETRIES 0
237 #define SG_DEF_FORCE_LOW_DMA 0
238 #define SG_DEF_FORCE_PACK_ID 0
239 #define SG_DEF_KEEP_ORPHAN 0
240 #define SG_DEF_RESERVED_SIZE SG_SCATTER_SZ
243 #define SG_MAX_QUEUE 16
245 #define SG_BIG_BUFF SG_DEF_RESERVED_SIZE
258 #define SG_MAX_SENSE 16
283 #define SG_SET_TIMEOUT 0x2201
284 #define SG_GET_TIMEOUT 0x2202
289 #define SG_GET_COMMAND_Q 0x2270
290 #define SG_SET_COMMAND_Q 0x2271
294 #define SG_SET_DEBUG 0x227e
296 #define SG_NEXT_CMD_LEN 0x2283
302 #define SG_DEFAULT_TIMEOUT_USER (60*USER_HZ)
304 #define SG_DEFAULT_TIMEOUT (60*HZ)
307 #define SG_DEF_COMMAND_Q 0
309 #define SG_DEF_UNDERRUN_FLAG 0