[PATCH v1 1/2] ufs: core: update CQ Entry to UFS 4.1 format
Bart Van Assche
bvanassche at acm.org
Tue Oct 14 08:44:14 PDT 2025
On 10/14/25 6:15 AM, peter.wang at mediatek.com wrote:
> diff --git a/include/ufs/ufshci.h b/include/ufs/ufshci.h
> index 612500a7088f..8b14f6e5e6f5 100644
> --- a/include/ufs/ufshci.h
> +++ b/include/ufs/ufshci.h
> @@ -567,10 +567,19 @@ struct cq_entry {
> __le16 prd_table_offset;
>
> /* DW 4 */
> - __le32 status;
> -
> - /* DW 5-7 */
> - __le32 reserved[3];
> + u8 overall_status;
> + u8 extended_error_code;
> + __le16 reserved_1;
> +
> + /* DW 5 */
> + u8 task_tag;
> + u8 lun;
> + u8 iid:4;
> + u8 ext_iid:4;
> + u8 reserved_2;
> +
> + /* DW 6-7 */
> + __le32 reserved_3[2];
> };
The above definition is only correct for little endian CPUs. If you
really want to use bitfields, please take a look at struct
request_desc_header for making bitfield definitions work for both little
and big endian CPUs.
Bart.
More information about the Linux-mediatek
mailing list