blob: 31e85786af14a982eb66dd2fff1a02a817f85373 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPIBSG_H
8#define _UAPIBSG_H
9#include <linux/types.h>
10#define BSG_PROTOCOL_SCSI 0
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define BSG_SUB_PROTOCOL_SCSI_CMD 0
12#define BSG_SUB_PROTOCOL_SCSI_TMF 1
13#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2
14#define BSG_FLAG_Q_AT_TAIL 0x10
Christopher Ferris82d75042015-01-26 10:57:07 -080015#define BSG_FLAG_Q_AT_HEAD 0x20
Ben Cheng655a7c02013-10-16 16:09:24 -070016struct sg_io_v4 {
Tao Baod7db5942015-01-28 10:07:51 -080017 __s32 guard;
18 __u32 protocol;
Tao Baod7db5942015-01-28 10:07:51 -080019 __u32 subprotocol;
20 __u32 request_len;
21 __u64 request;
22 __u64 request_tag;
Tao Baod7db5942015-01-28 10:07:51 -080023 __u32 request_attr;
24 __u32 request_priority;
25 __u32 request_extra;
26 __u32 max_response_len;
Tao Baod7db5942015-01-28 10:07:51 -080027 __u64 response;
28 __u32 dout_iovec_count;
29 __u32 dout_xfer_len;
30 __u32 din_iovec_count;
Tao Baod7db5942015-01-28 10:07:51 -080031 __u32 din_xfer_len;
32 __u64 dout_xferp;
33 __u64 din_xferp;
34 __u32 timeout;
Tao Baod7db5942015-01-28 10:07:51 -080035 __u32 flags;
36 __u64 usr_ptr;
37 __u32 spare_in;
38 __u32 driver_status;
Tao Baod7db5942015-01-28 10:07:51 -080039 __u32 transport_status;
40 __u32 device_status;
41 __u32 retry_delay;
42 __u32 info;
Tao Baod7db5942015-01-28 10:07:51 -080043 __u32 duration;
44 __u32 response_len;
45 __s32 din_resid;
46 __s32 dout_resid;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u64 generated_tag;
48 __u32 spare_out;
49 __u32 padding;
Ben Cheng655a7c02013-10-16 16:09:24 -070050};
Christopher Ferris82d75042015-01-26 10:57:07 -080051#endif