Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: core: Support UFSHCI 4.1 CQ entry tag

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 <peter.wang@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260210071834.1837878-1-peter.wang@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Peter Wang and committed by
Martin K. Petersen
f707860e 3abe4113

+6 -1
+6 -1
drivers/ufs/core/ufs-mcq.c
··· 273 273 EXPORT_SYMBOL_GPL(ufshcd_mcq_write_cqis); 274 274 275 275 /* 276 - * Current MCQ specification doesn't provide a Task Tag or its equivalent in 276 + * UFSHCI 4.0 MCQ specification doesn't provide a Task Tag or its equivalent in 277 277 * the Completion Queue Entry. Find the Task Tag using an indirect method. 278 + * UFSHCI 4.1 and above can directly return the Task Tag in the Completion Queue 279 + * Entry. 278 280 */ 279 281 static int ufshcd_mcq_get_tag(struct ufs_hba *hba, struct cq_entry *cqe) 280 282 { 281 283 u64 addr; 284 + 285 + if (hba->ufs_version >= ufshci_version(4, 1)) 286 + return cqe->task_tag; 282 287 283 288 /* sizeof(struct utp_transfer_cmd_desc) must be a multiple of 128 */ 284 289 BUILD_BUG_ON(sizeof(struct utp_transfer_cmd_desc) & GENMASK(6, 0));