linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Can Guo <cang@codeaurora.org>
To: Stanley Chu <stanley.chu@mediatek.com>
Cc: linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
	andy.teng@mediatek.com, jejb@linux.ibm.com,
	chun-hung.wu@mediatek.com, kuohong.wang@mediatek.com,
	linux-kernel@vger.kernel.org, asutoshd@codeaurora.org,
	avri.altman@wdc.com, linux-mediatek@lists.infradead.org,
	peter.wang@mediatek.com, alim.akhtar@samsung.com,
	matthias.bgg@gmail.com, beanhuo@micron.com,
	chaotian.jing@mediatek.com, cc.chou@mediatek.com,
	linux-arm-kernel@lists.infradead.org, bvanassche@acm.org
Subject: Re: [PATCH v1 2/2] scsi: ufs: Fix and simplify setup_xfer_req variant operation
Date: Tue, 14 Jul 2020 17:19:29 +0800	[thread overview]
Message-ID: <74cc1ad32c414762ab5d18ed8b46c26a@codeaurora.org> (raw)
In-Reply-To: <20200706060707.32608-3-stanley.chu@mediatek.com>

On 2020-07-06 14:07, Stanley Chu wrote:
> Add missing "setup_xfer_req" call in ufshcd_issue_devman_upiu_cmd()
> by ufs-bsg path, and collect all "setup_xfer_req" calls to an unified
> place, i.e., ufshcd_send_command(), to simplify the driver.
> 
> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>

Reviewed-by: Can Guo <cang@codeaurora.org>

> ---
>  drivers/scsi/ufs/ufshcd.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 71e8d7c782bd..8603b07045a6 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -1925,8 +1925,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_add_command_trace(hba, task_tag, "send");
>  	ufshcd_clk_scaling_start_busy(hba);
>  	__set_bit(task_tag, &hba->outstanding_reqs);
> @@ -2544,7 +2547,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, true);
>  	ufshcd_send_command(hba, tag);
>  out_unlock:
>  	spin_unlock_irqrestore(hba->host->host_lock, flags);
> @@ -2731,7 +2733,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, false);
>  	ufshcd_send_command(hba, tag);
>  	spin_unlock_irqrestore(hba->host->host_lock, flags);

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2020-07-14  9:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06  6:07 [PATCH v1 0/2] scsi: ufs: Fix and simplify setup_xfer_req vop and request's completion timestamp Stanley Chu
2020-07-06  6:07 ` [PATCH v1 1/2] scsi: ufs: Simplify completion timestamp for SCSI and query commands Stanley Chu
2020-07-14  9:18   ` Can Guo
2020-07-06  6:07 ` [PATCH v1 2/2] scsi: ufs: Fix and simplify setup_xfer_req variant operation Stanley Chu
2020-07-14  9:19   ` Can Guo [this message]
2020-07-09 11:09 ` [PATCH v1 0/2] scsi: ufs: Fix and simplify setup_xfer_req vop and request's completion timestamp Avri Altman
2020-07-14  4:58 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74cc1ad32c414762ab5d18ed8b46c26a@codeaurora.org \
    --to=cang@codeaurora.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andy.teng@mediatek.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cc.chou@mediatek.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=chun-hung.wu@mediatek.com \
    --cc=jejb@linux.ibm.com \
    --cc=kuohong.wang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthias.bgg@gmail.com \
    --cc=peter.wang@mediatek.com \
    --cc=stanley.chu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).