mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
BACKPORT: scsi: ufs: Fix and simplify setup_xfer_req variant operation
Add missing setup_xfer_req() call in ufshcd_issue_devman_upiu_cmd() in ufs-bsg path. Relocate existing setup_xfer_req() calls to a common place, i.e., ufshcd_send_command(), to simplify the driver. Bug: 163100328 Link: https://lore.kernel.org/r/20200706060707.32608-3-stanley.chu@mediatek.com Acked-by: Avri Altman <Avri.Altman@wdc.com> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Change-Id: Ibe16a421e5f3f003529379b1ac96b0a9306b0fe0 (cherry picked from commit 6edfdcfe285e499994b94a0f93e1f46ab2398162) Signed-off-by: nanich.lee <nanich.lee@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
e1c8b315a8
commit
7d9aa46031
1 changed files with 5 additions and 4 deletions
|
|
@ -1986,8 +1986,11 @@ static void ufshcd_clk_scaling_update_busy(struct ufs_hba *hba)
|
|||
static inline
|
||||
void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag)
|
||||
{
|
||||
hba->lrb[task_tag].issue_time_stamp = ktime_get();
|
||||
hba->lrb[task_tag].compl_time_stamp = ktime_set(0, 0);
|
||||
struct ufshcd_lrb *lrbp = &hba->lrb[task_tag];
|
||||
|
||||
lrbp->issue_time_stamp = ktime_get();
|
||||
lrbp->compl_time_stamp = ktime_set(0, 0);
|
||||
ufshcd_vops_setup_xfer_req(hba, task_tag, (lrbp->cmd ? true : false));
|
||||
ufshcd_clk_scaling_start_busy(hba);
|
||||
__set_bit(task_tag, &hba->outstanding_reqs);
|
||||
ufshcd_writel(hba, 1 << task_tag, REG_UTP_TRANSFER_REQ_DOOR_BELL);
|
||||
|
|
@ -2618,7 +2621,6 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
|||
|
||||
/* issue command to the controller */
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
ufshcd_vops_setup_xfer_req(hba, tag, (lrbp->cmd ? true : false));
|
||||
ufshcd_send_command(hba, tag);
|
||||
out_unlock:
|
||||
spin_unlock_irqrestore(hba->host->host_lock, flags);
|
||||
|
|
@ -2838,7 +2840,6 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,
|
|||
/* Make sure descriptors are ready before ringing the doorbell */
|
||||
wmb();
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
ufshcd_vops_setup_xfer_req(hba, tag, (lrbp->cmd ? true : false));
|
||||
ufshcd_send_command(hba, tag);
|
||||
spin_unlock_irqrestore(hba->host->host_lock, flags);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue