blob: 177cae984ef0136047411d9131b49c4a2244bbe4 [file] [log] [blame]
Christopher Ferris86a48372019-01-10 14:14:59 -08001/****************************************************************************
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 SCSI_BSG_UFS_H
20#define SCSI_BSG_UFS_H
21#include <linux/types.h>
22#define UFS_CDB_SIZE 16
23#define UPIU_TRANSACTION_UIC_CMD 0x1F
24#define UIC_CMD_SIZE (sizeof(__u32) * 4)
25struct utp_upiu_header {
26 __be32 dword_0;
27 __be32 dword_1;
28 __be32 dword_2;
29};
30struct utp_upiu_query {
31 __u8 opcode;
32 __u8 idn;
33 __u8 index;
34 __u8 selector;
35 __be16 reserved_osf;
36 __be16 length;
37 __be32 value;
38 __be32 reserved[2];
39};
40struct utp_upiu_cmd {
41 __be32 exp_data_transfer_len;
42 __u8 cdb[UFS_CDB_SIZE];
43};
44struct utp_upiu_req {
45 struct utp_upiu_header header;
46 union {
47 struct utp_upiu_cmd sc;
48 struct utp_upiu_query qr;
49 struct utp_upiu_query tr;
50 struct utp_upiu_query uc;
51 };
52};
53struct ufs_bsg_request {
54 __u32 msgcode;
55 struct utp_upiu_req upiu_req;
56};
57struct ufs_bsg_reply {
58 __u32 result;
59 __u32 reply_payload_rcv_len;
60 struct utp_upiu_req upiu_rsp;
61};
62#endif