Re: [PATCH v4 1/1] scsi: ufs: core: add device level exception support

From: Bart Van Assche
Date: Fri Mar 28 2025 - 10:08:34 EST


On 3/27/25 5:45 PM, Bao D. Nguyen wrote:
Thanks Bart. How about we change the current utp_upiu_query_v4_0 to

struct utp_upiu_query_v4_0 {
        __u8 opcode;
        __u8 idn;
        __u8 index;
        __u8 selector;
        __u8 cmd_specifics[8];
        /* private: */
        __be32 reserved;
};

Depending on the opcode/transaction, the cmd_specifics[] can be type casted to access the LENGTH, FLAG_VALUE, VALUE[0:63] fields of the QUERY UPIU. The __u8 array[8] would also prevent the compiler padding to the data.

Are there any user space applications that use the osf3/4/5/6/7 member
names? Has it been considered to preserve these by introducing a union?

Thanks,

Bart.