mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
scsi: ufs: mcq: Use pointer arithmetic in ufshcd_send_command()
Make sqe_base_addr the UTRD pointer it is, instead of an opaque void *. Signed-off-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20230329101303.18377-3-avri.altman@wdc.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
4de243c40c
commit
3c85f087fa
@ -2242,10 +2242,11 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag,
|
||||
|
||||
if (is_mcq_enabled(hba)) {
|
||||
int utrd_size = sizeof(struct utp_transfer_req_desc);
|
||||
struct utp_transfer_req_desc *src = lrbp->utr_descriptor_ptr;
|
||||
struct utp_transfer_req_desc *dest = hwq->sqe_base_addr + hwq->sq_tail_slot;
|
||||
|
||||
spin_lock(&hwq->sq_lock);
|
||||
memcpy(hwq->sqe_base_addr + (hwq->sq_tail_slot * utrd_size),
|
||||
lrbp->utr_descriptor_ptr, utrd_size);
|
||||
memcpy(dest, src, utrd_size);
|
||||
ufshcd_inc_sq_tail(hwq);
|
||||
spin_unlock(&hwq->sq_lock);
|
||||
} else {
|
||||
|
@ -1095,7 +1095,7 @@ struct ufs_hw_queue {
|
||||
void __iomem *mcq_cq_head;
|
||||
void __iomem *mcq_cq_tail;
|
||||
|
||||
void *sqe_base_addr;
|
||||
struct utp_transfer_req_desc *sqe_base_addr;
|
||||
dma_addr_t sqe_dma_addr;
|
||||
struct cq_entry *cqe_base_addr;
|
||||
dma_addr_t cqe_dma_addr;
|
||||
|
Loading…
Reference in New Issue
Block a user