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 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) 25 struct utp_upiu_header { 26 __be32 dword_0; 27 __be32 dword_1; 28 __be32 dword_2; 29 }; 30 struct 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 }; 40 struct utp_upiu_cmd { 41 __be32 exp_data_transfer_len; 42 __u8 cdb[UFS_CDB_SIZE]; 43 }; 44 struct 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 uc; 50 }; 51 }; 52 struct ufs_bsg_request { 53 __u32 msgcode; 54 struct utp_upiu_req upiu_req; 55 }; 56 struct ufs_bsg_reply { 57 __u32 result; 58 __u32 reply_payload_rcv_len; 59 struct utp_upiu_req upiu_rsp; 60 }; 61 #endif 62