mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Martin K. Petersen
parent
ce085ecdba
commit
bfe0d22f12
@@ -856,7 +856,7 @@ static enum utp_ocs ufshcd_get_tr_ocs(struct ufshcd_lrb *lrbp,
|
||||
struct cq_entry *cqe)
|
||||
{
|
||||
if (cqe)
|
||||
return le32_to_cpu(cqe->status) & MASK_OCS;
|
||||
return cqe->overall_status & MASK_OCS;
|
||||
|
||||
return lrbp->utr_descriptor_ptr->header.ocs & MASK_OCS;
|
||||
}
|
||||
@@ -5646,7 +5646,7 @@ void ufshcd_compl_one_cqe(struct ufs_hba *hba, int task_tag,
|
||||
scsi_done(cmd);
|
||||
} else {
|
||||
if (cqe) {
|
||||
ocs = le32_to_cpu(cqe->status) & MASK_OCS;
|
||||
ocs = cqe->overall_status & MASK_OCS;
|
||||
lrbp->utr_descriptor_ptr->header.ocs = ocs;
|
||||
}
|
||||
complete(&hba->dev_cmd.complete);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user