[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c4b58912-d22e-9c35-3861-377cc78e7694@quicinc.com>
Date: Wed, 3 May 2023 21:04:08 -0700
From: "Bao D. Nguyen" <quic_nguyenb@...cinc.com>
To: Bart Van Assche <bvanassche@....org>, <quic_asutoshd@...cinc.com>,
<quic_cang@...cinc.com>, <mani@...nel.org>,
<Powen.Kao@...iatek.com>, <stanley.chu@...iatek.com>,
<adrian.hunter@...el.com>, <beanhuo@...ron.com>,
<avri.altman@....com>, <martin.petersen@...cle.com>
CC: <linux-scsi@...r.kernel.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Arthur Simchaev <Arthur.Simchaev@....com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/5] ufs: mcq: Added ufshcd_mcq_abort()
On 4/25/2023 5:12 PM, Bart Van Assche wrote:
> On 4/17/23 14:05, Bao D. Nguyen wrote:
>> + if (!lrbp->cmd) {
>> + dev_err(hba->dev,
>> + "%s: skip abort. cmd at tag %d already completed.\n",
>> + __func__, tag);
>> + goto out;
>> + }
>
> Please do not use lrbp->cmd to check whether or not a command has
> completed.
Yes. Same comment as in patch #2.
>
>> + if (ufshcd_mcq_sqe_search(hba, hwq, tag)) {
>> + /*
>> + * Failure. The command should not be "stuck" in SQ for
>> + * a long time which resulted in command being aborted.
>> + */
>> + dev_err(hba->dev, "%s: cmd found in sq. hwq=%d, tag=%d\n",
>> + __func__, hwq->id, tag);
>> + /* Set the Command Type to 0xF per the spec */
>> + ufshcd_mcq_nullify_cmd(hba, hwq);
>
> The above looks wrong to me. How can ufshcd_mcq_nullify_cmd() identify a
> command if the 'tag' argument is not passed to that function?
Same comment as in patch #1. I will change this function.
> >> + /*
>> + * The command is not in the Submission Queue, and it is not
>> + * in the Completion Queue either. Query the device to see if
>> + * the command is being processed in the device.
>> + */
>
> Please only use capitals if these are required.
Yes, I will change.
>
>> + if (lrbp->cmd)
>> + ufshcd_release_scsi_cmd(hba, lrbp);
>
> Same comment here - do not use lrbp->cmd to check for completion.
Yes.
>
> Thanks,
>
> Bart.
Powered by blists - more mailing lists