scsi: ufs: core: Fix MCQ tag calculation
authorPo-Wen Kao <powen.kao@mediatek.com>
Thu, 4 May 2023 15:44:49 +0000 (23:44 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 May 2023 01:07:26 +0000 (21:07 -0400)
commit5149452ca66289ef33d13897ee845a2f6f5b680f
tree9beee6860bbf639609a330dfa74e6d3ffb1f2354
parent1a7edd041f2d252f251523ba3f2eaead076a8f8d
scsi: ufs: core: Fix MCQ tag calculation

The transfer command descriptor is allocated in ufshcd_memory_alloc() and
referenced by the transfer request descriptor with stride size
sizeof_utp_transfer_cmd_desc() instead of sizeof(struct
utp_transfer_cmd_desc).

Consequently, computing tag by address offset should also refer to the
same stride.

Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com>
Link: https://lore.kernel.org/r/20230504154454.26654-2-powen.kao@mediatek.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Ziqi Chen <quic_ziqichen@quicinc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufs-mcq.c
drivers/ufs/core/ufshcd.c