STRUCT UTP_UPIU_HEADER(9)
okay bestie, you're on the struct utp_upiu_header(9) page from the Kernel API Manual π this is the UPIU header structure, and we're gonna keep every single member, flag, and literal exactly as it is. No skips, no cap π«Ά
β¨ NAME β¨
struct utp_upiu_header β UPIU header structure. Short, sweet, iconic β¨
πΈ SYNOPSIS πΈ
Here's the struct, copied exactly β braces, semicolons, endianness branches, all of it π
struct utp_upiu_header {
union {
struct {
__be32 dword_0;
__be32 dword_1;
__be32 dword_2;
};
struct {
__u8 transaction_code;
__u8 flags;
__u8 lun;
__u8 task_tag;
#if defined(__BIG_ENDIAN);
__u8 iid: 4;
__u8 command_set_type: 4;
#elif defined(__LITTLE_ENDIAN);
__u8 command_set_type: 4;
__u8 iid: 4;
#else;
#error;
#endif;
union {
__u8 tm_function;
__u8 query_function;
};
__u8 response;
__u8 status;
__u8 ehs_length;
__u8 device_information;
__be16 data_segment_length;
};
};
};
π§ Members π§
Okay, member-by-member, in source order. The source repeats command_set_type and iid, so they appear twice below too β not a typo, that's just the tea π
{unnamed_union}β anonymous{unnamed_struct}β anonymousdword_0β UPIU header DW-0dword_1β UPIU header DW-1dword_2β UPIU header DW-2{unnamed_struct}β anonymoustransaction_codeβ Type of request or response. See also enumupiu_request_transactionand enumupiu_response_transaction.flagsβ UPIU flags. The meaning of individual flags depends on the transaction code.lunβ Logical unit number.task_tagβ Task tag.iidβ Initiator ID.command_set_typeβ 0 for SCSI command set; 1 for UFS specific.command_set_typeβ 0 for SCSI command set; 1 for UFS specific.iidβ Initiator ID.{unnamed_union}β anonymoustm_functionβ Task management function in case of a task management request UPIU.query_functionβ Query function in case of a query request UPIU.responseβ 0 for success; 1 for failure.statusβ SCSI status if this is the header of a response to a SCSI command.ehs_lengthβ EHS length in units of 32 bytes.device_informationβ (no description in the source, so no invented tea π)data_segment_lengthβ data segment length.
π SEE ALSO π
- Kernel file
./include/uapi/scsi/scsi_bsg_ufs.hplusstruct utp_upiu_query(9),struct utp_upiu_query_v4_0(9),struct utp_upiu_cmd(9),struct utp_upiu_req(9)β that's the whole reference crew π«Ά
Source/version line points at ./include/uapi/scsi, date says October 2026, and the page is struct utp_upiu_header(9) β bye bestie, go be iconic with your structs ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms