[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53f22b81-a738-8f94-8e08-2395133d0249@acm.org>
Date: Tue, 25 Apr 2023 17:12:43 -0700
From: Bart Van Assche <bvanassche@....org>
To: "Bao D. Nguyen" <quic_nguyenb@...cinc.com>,
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/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.
> + 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?
> + /*
> + * 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.
> + if (lrbp->cmd)
> + ufshcd_release_scsi_cmd(hba, lrbp);
Same comment here - do not use lrbp->cmd to check for completion.
Thanks,
Bart.
Powered by blists - more mailing lists