Add the bsg_uring_cmd structure to the BSG UAPI header to support io_uring-based SCSI passthrough operations via IORING_OP_URING_CMD. Signed-off-by: Yang Xiuwei --- include/uapi/linux/bsg.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/uapi/linux/bsg.h b/include/uapi/linux/bsg.h index cd6302def5ed..0a589e2ceb3b 100644 --- a/include/uapi/linux/bsg.h +++ b/include/uapi/linux/bsg.h @@ -63,5 +63,24 @@ struct sg_io_v4 { __u32 padding; }; +struct bsg_uring_cmd { + /* Command request related */ + __u64 request; /* [i], [*i] command descriptor address */ + __u32 request_len; /* [i] command descriptor length in bytes */ + /* Protocol related */ + __u32 protocol; /* [i] protocol type (BSG_PROTOCOL_*) */ + __u32 subprotocol; /* [i] subprotocol type (BSG_SUB_PROTOCOL_*) */ + /* Response data related */ + __u32 max_response_len; /* [i] response buffer size in bytes */ + __u64 response; /* [i], [*o] response data address */ + /* Data transfer related */ + __u64 xfer_addr; /* [i] data transfer buffer address */ + __u32 xfer_len; /* [i] data transfer length in bytes */ + __u32 xfer_dir; /* [i] 0=din (read), 1=dout (write) */ + __u32 iovec_count; /* [i] iovec array count, 0 for flat buffer */ + /* Control related */ + __u32 timeout_ms; /* [i] timeout in milliseconds */ + __u8 reserved[24]; /* reserved for future extension */ +}; #endif /* _UAPIBSG_H */ -- 2.25.1