lkml.org 
[lkml]   [2022]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 1/2] scsi: ufs: Add Multi-Circular Queue support
Date
>  static inline
> -void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag)
> +void ufshcd_send_command(struct ufs_hba *hba, struct ufshcd_lrb *lrbp,
> + struct ufs_hw_queue *hwq)
> {
> - struct ufshcd_lrb *lrbp = &hba->lrb[task_tag];
> unsigned long flags;
>
> lrbp->issue_time_stamp = ktime_get();
> lrbp->compl_time_stamp = ktime_set(0, 0);
> - ufshcd_add_command_trace(hba, task_tag, UFS_CMD_SEND);
> + ufshcd_add_command_trace(hba, lrbp, UFS_CMD_SEND);
> ufshcd_clk_scaling_start_busy(hba);
> if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))
> ufshcd_start_monitor(hba, lrbp);
>
> - spin_lock_irqsave(&hba->outstanding_lock, flags);
> - if (hba->vops && hba->vops->setup_xfer_req)
> - hba->vops->setup_xfer_req(hba, task_tag, !!lrbp->cmd);
> - __set_bit(task_tag, &hba->outstanding_reqs);
> - ufshcd_writel(hba, 1 << task_tag,
> REG_UTP_TRANSFER_REQ_DOOR_BELL);
> - spin_unlock_irqrestore(&hba->outstanding_lock, flags);
> + if (is_mcq_enabled(hba)) {
> + int utrd_size = sizeof(struct utp_transfer_req_desc);
Maybe we can map some designated ops, so all those if (is_mcq) can be avoided in the data-path.
Also maybe we can constify sizeof(struct utp_transfer_req_desc) which is used now few times.

Thanks,
Avri

\
 
 \ /
  Last update: 2022-07-23 23:24    [W:0.378 / U:1.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site