summaryrefslogtreecommitdiff
path: root/include/ufs
diff options
context:
space:
mode:
authorPeter Wang <peter.wang@mediatek.com>2025-10-16 10:32:31 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2025-10-21 21:16:04 -0400
commitbfe0d22f12559f44bf27ae88b9c4a9f8fdae65d0 (patch)
treee09dafcd9144fbcbeee6c9ed897d921ca53c4fa7 /include/ufs
parentce085ecdba23a5d5462877d884ecff3ffceaad22 (diff)
scsi: ufs: core: Update CQ Entry to UFS 4.1 format
Update the completion queue (CQ) entry format according to the UFS 4.1 specification. UFS 4.1 introduces new members in reserved record DW5. Also refine DW4 with detailed members defined in UFS 4.0. Modify the code to incorporate these changes by updating the overall_status in the CQ entry structure. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20251016023507.1000664-2-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/ufs')
-rw-r--r--include/ufs/ufshci.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/include/ufs/ufshci.h b/include/ufs/ufshci.h
index e64b70132101..bfc5401a9a0a 100644
--- a/include/ufs/ufshci.h
+++ b/include/ufs/ufshci.h
@@ -569,10 +569,26 @@ struct cq_entry {
__le16 prd_table_offset;
/* DW 4 */
- __le32 status;
+ u8 overall_status;
+ u8 extended_error_code;
+ __le16 reserved_1;
- /* DW 5-7 */
- __le32 reserved[3];
+ /* DW 5 */
+ u8 task_tag;
+ u8 lun;
+#if defined(__BIG_ENDIAN)
+ u8 ext_iid:4;
+ u8 iid:4;
+#elif defined(__LITTLE_ENDIAN)
+ u8 iid:4;
+ u8 ext_iid:4;
+#else
+#error
+#endif
+ u8 reserved_2;
+
+ /* DW 6-7 */
+ __le32 reserved_3[2];
};
static_assert(sizeof(struct cq_entry) == 32);