ufs: core: support UFSHCI 4.1 CQ entry tag
Subsystems (3)
PATCH v2 1/1 ufs: core: support UFSHCI 4.1 CQ entry tag
From: Peter Wang <[email protected]>
The UFSHCI 4.1 specification introduces a new completion queue(CQ) entry format, allowing the tag to be obtained directly.
--- drivers/ufs/core/ufs-mcq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/ufs/core/ufs-mcq.c +6 -1
@@ -273,13 +273,18 @@ void ufshcd_mcq_write_cqis(struct ufs_hba *hba, u32 val, int i)EXPORT_SYMBOL_GPL (ufshcd_mcq_write_cqis);/* -* Current MCQ specification doesn't provide a Task Tag or its equivalent in +* UFSHCI 4.0 MCQ specification doesn't provide a Task Tag or its equivalent in * the Completion Queue Entry. Find the Task Tag using an indirect method. +* UFSHCI 4.1 and above can directly return the Task Tag in the Completion Queue +* Entry. */ static int ufshcd_mcq_get_tag (struct ufs_hba *hba,struct cq_entry *cqe) {u64 addr; +if (hba->ufs_version >=ufshci_version (4 ,1 )) +return cqe->task_tag; +/* sizeof(struct utp_transfer_cmd_desc) must be a multiple of 128 */ BUILD_BUG_ON (sizeof (struct utp_transfer_cmd_desc ) &GENMASK (6 ,0 ));
Signature · 1 line
2.45.2
Quoted 6 lines · On Tue, 2026-02-10 at 15:17 +0800, [email protected] wrote:
From: Peter Wang <[email protected]>
The UFSHCI 4.1 specification introduces a new completion queue(CQ) entry format, allowing the tag to be obtained directly.
Signed-off-by Peter Wang <[email protected]>
Quoted 2 lines · On 2/9/26 11:17 PM, [email protected] wrote:
The UFSHCI 4.1 specification introduces a new completion queue(CQ) entry format, allowing the tag to be obtained directly.
Martin K. Petersen
AppliedQuoted 3 lines
The UFSHCI 4.1 specification introduces a new completion queue(CQ) entry format, allowing the tag to be obtained directly.
Applied to 7.1/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 4 lines · On Tue, 10 Feb 2026 15:17:30 +0800, [email protected] wrote:
The UFSHCI 4.1 specification introduces a new completion queue(CQ) entry format, allowing the tag to be obtained directly.
Applied to 7.1/scsi-queue, thanks!
[1/1] ufs: core: support UFSHCI 4.1 CQ entry tag
https://git.kernel.org/mkp/scsi/c/f707860ebc84
Signature · 1 line
Martin K. Petersen