[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGOxZ53JFyFVZoLY0bbc8P9YbfPo2ioMiRS4+67VniXNYRjJ6g@mail.gmail.com>
Date: Mon, 18 Nov 2019 18:50:32 +0530
From: Alim Akhtar <alim.akhtar@...il.com>
To: Can Guo <cang@...eaurora.org>
Cc: asutoshd@...eaurora.org, nguyenb@...eaurora.org,
rnayak@...eaurora.org, linux-scsi@...r.kernel.org,
kernel-team@...roid.com, saravanak@...gle.com,
Mark Salyzyn <salyzyn@...gle.com>,
Alim Akhtar <alim.akhtar@...sung.com>,
Avri Altman <avri.altman@....com>,
Pedro Sousa <pedrom.sousa@...opsys.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Stanley Chu <stanley.chu@...iatek.com>,
Bean Huo <beanhuo@...ron.com>,
Tomas Winkler <tomas.winkler@...el.com>,
Venkat Gopalakrishnan <venkatg@...eaurora.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/4] scsi: ufs: Avoid messing up the compl_time_stamp
of lrbs
On Mon, Nov 18, 2019 at 9:27 AM Can Guo <cang@...eaurora.org> wrote:
>
> To be on the safe side, do not touch one lrb after clear its slot in the
> lrb_in_use bitmap to avoid messing up the next task which would possibly
> occupy this lrb.
>
> Signed-off-by: Can Guo <cang@...eaurora.org>
> ---
Tested-by: Alim Akhtar <alim.akhtar@...sung.com>
> drivers/scsi/ufs/ufshcd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 8e7c362..5950a7c 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -4902,12 +4902,14 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
> cmd->result = result;
> /* Mark completed command as NULL in LRB */
> lrbp->cmd = NULL;
> + lrbp->compl_time_stamp = ktime_get();
> clear_bit_unlock(index, &hba->lrb_in_use);
> /* Do not touch lrbp after scsi done */
> cmd->scsi_done(cmd);
> __ufshcd_release(hba);
> } else if (lrbp->command_type == UTP_CMD_TYPE_DEV_MANAGE ||
> lrbp->command_type == UTP_CMD_TYPE_UFS_STORAGE) {
> + lrbp->compl_time_stamp = ktime_get();
> if (hba->dev_cmd.complete) {
> ufshcd_add_command_trace(hba, index,
> "dev_complete");
> @@ -4916,8 +4918,6 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
> }
> if (ufshcd_is_clkscaling_supported(hba))
> hba->clk_scaling.active_reqs--;
> -
> - lrbp->compl_time_stamp = ktime_get();
> }
>
> /* clear corresponding bits of completed commands */
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
--
Regards,
Alim
Powered by blists - more mailing lists