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
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define BSG_SUB_PROTOCOL_SCSI_CMD 0
25 #define BSG_SUB_PROTOCOL_SCSI_TMF 1
26 #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2
27 #define BSG_FLAG_Q_AT_TAIL 0x10
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 struct sg_io_v4 {
30  __s32 guard;
31  __u32 protocol;
32  __u32 subprotocol;
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  __u32 request_len;
35  __u64 request;
36  __u64 request_tag;
37  __u32 request_attr;
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  __u32 request_priority;
40  __u32 request_extra;
41  __u32 max_response_len;
42  __u64 response;
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  __u32 dout_iovec_count;
45  __u32 dout_xfer_len;
46  __u32 din_iovec_count;
47  __u32 din_xfer_len;
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  __u64 dout_xferp;
50  __u64 din_xferp;
51  __u32 timeout;
52  __u32 flags;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  __u64 usr_ptr;
55  __u32 spare_in;
56  __u32 driver_status;
57  __u32 transport_status;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  __u32 device_status;
60  __u32 retry_delay;
61  __u32 info;
62  __u32 duration;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  __u32 response_len;
65  __s32 din_resid;
66  __s32 dout_resid;
67  __u64 generated_tag;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  __u32 spare_out;
70  __u32 padding;
71 };
72 #endif
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74