1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef _UAPIBSG_H 7 #define _UAPIBSG_H 8 #include <linux/types.h> 9 #define BSG_PROTOCOL_SCSI 0 10 #define BSG_SUB_PROTOCOL_SCSI_CMD 0 11 #define BSG_SUB_PROTOCOL_SCSI_TMF 1 12 #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 13 #define BSG_FLAG_Q_AT_TAIL 0x10 14 #define BSG_FLAG_Q_AT_HEAD 0x20 15 struct sg_io_v4 { 16 __s32 guard; 17 __u32 protocol; 18 __u32 subprotocol; 19 __u32 request_len; 20 __u64 request; 21 __u64 request_tag; 22 __u32 request_attr; 23 __u32 request_priority; 24 __u32 request_extra; 25 __u32 max_response_len; 26 __u64 response; 27 28 __u32 dout_iovec_count; 29 __u32 dout_xfer_len; 30 __u32 din_iovec_count; 31 __u32 din_xfer_len; 32 __u64 dout_xferp; 33 __u64 din_xferp; 34 __u32 timeout; 35 __u32 flags; 36 __u64 usr_ptr; 37 __u32 spare_in; 38 __u32 driver_status; 39 __u32 transport_status; 40 __u32 device_status; 41 __u32 retry_delay; 42 __u32 info; 43 __u32 duration; 44 __u32 response_len; 45 __s32 din_resid; 46 __s32 dout_resid; 47 __u64 generated_tag; 48 __u32 spare_out; 49 __u32 padding; 50 }; 51 #endif 52