| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 _UAPIBSG_H | 
|  | 20 | #define _UAPIBSG_H | 
|  | 21 | #include <linux/types.h> | 
|  | 22 | #define BSG_PROTOCOL_SCSI 0 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define BSG_SUB_PROTOCOL_SCSI_CMD 0 | 
|  | 24 | #define BSG_SUB_PROTOCOL_SCSI_TMF 1 | 
|  | 25 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 | 
|  | 26 | #define BSG_FLAG_Q_AT_TAIL 0x10 | 
| Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 27 | #define BSG_FLAG_Q_AT_HEAD 0x20 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | struct sg_io_v4 { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | __s32 guard; | 
|  | 30 | __u32 protocol; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __u32 subprotocol; | 
|  | 32 | __u32 request_len; | 
|  | 33 | __u64 request; | 
|  | 34 | __u64 request_tag; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u32 request_attr; | 
|  | 36 | __u32 request_priority; | 
|  | 37 | __u32 request_extra; | 
|  | 38 | __u32 max_response_len; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | __u64 response; | 
|  | 40 | __u32 dout_iovec_count; | 
|  | 41 | __u32 dout_xfer_len; | 
|  | 42 | __u32 din_iovec_count; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __u32 din_xfer_len; | 
|  | 44 | __u64 dout_xferp; | 
|  | 45 | __u64 din_xferp; | 
|  | 46 | __u32 timeout; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __u32 flags; | 
|  | 48 | __u64 usr_ptr; | 
|  | 49 | __u32 spare_in; | 
|  | 50 | __u32 driver_status; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | __u32 transport_status; | 
|  | 52 | __u32 device_status; | 
|  | 53 | __u32 retry_delay; | 
|  | 54 | __u32 info; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | __u32 duration; | 
|  | 56 | __u32 response_len; | 
|  | 57 | __s32 din_resid; | 
|  | 58 | __s32 dout_resid; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | __u64 generated_tag; | 
|  | 60 | __u32 spare_out; | 
|  | 61 | __u32 padding; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | }; | 
| Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 63 | #endif |