From: Bart Van Assche <bvanassche@acm.org>
To: "Bao D. Nguyen" <quic_nguyenb@quicinc.com>,
quic_asutoshd@quicinc.com, quic_cang@quicinc.com,
mani@kernel.org, stanley.chu@mediatek.com,
adrian.hunter@intel.com, beanhuo@micron.com, avri.altman@wdc.com,
martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, Alim Akhtar <alim.akhtar@samsung.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Arthur Simchaev <Arthur.Simchaev@wdc.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/7] ufs: mcq: Add support for clean up mcq resources
Date: Wed, 10 May 2023 15:00:57 -0700 [thread overview]
Message-ID: <590cbc0e-51a5-5738-cb2e-7619adf2e4be@acm.org> (raw)
In-Reply-To: <d8de00bab403dc725cf638750083d5e5f1449eec.1683688693.git.quic_nguyenb@quicinc.com>
On 5/9/23 22:24, Bao D. Nguyen wrote:
> +bool ufshcd_cmd_inflight(struct scsi_cmnd *cmd)
> +{
> + struct request *rq;
> +
> + if (!cmd)
> + return false;
> +
> + rq = scsi_cmd_to_rq(cmd);
> + if (!rq || !blk_mq_request_started(rq))
> + return false;
> +
> + return true;
The return value of scsi_cmd_to_rq() is never NULL so please remove the
!rq test.
> @@ -7450,8 +7499,8 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
>
> ufshcd_hold(hba, false);
> reg = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
> - /* If command is already aborted/completed, return FAILED. */
> - if (!(test_bit(tag, &hba->outstanding_reqs))) {
> + if (!is_mcq_enabled(hba) && !test_bit(tag, &hba->outstanding_reqs)) {
> + /* If command is already aborted/completed, return FAILED. */
> dev_err(hba->dev,
> "%s: cmd at tag %d already completed, outstanding=0x%lx, doorbell=0x%x\n",
> __func__, tag, hba->outstanding_reqs, reg);
With the above change, the doorbell register is read even in MCQ mode.
Shouldn't reading the doorbell register be skipped in MCQ mode?
Thanks,
Bart.
next prev parent reply other threads:[~2023-05-10 22:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1683688692.git.quic_nguyenb@quicinc.com>
2023-05-10 5:24 ` [PATCH v3 1/7] ufs: core: Combine 32-bit command_desc_base_addr_lo/hi Bao D. Nguyen
2023-05-10 21:20 ` Bart Van Assche
2023-05-10 5:24 ` [PATCH v3 2/7] ufs: core: Update the ufshcd_clear_cmds() functionality Bao D. Nguyen
2023-05-10 21:25 ` Bart Van Assche
2023-05-10 21:57 ` Bart Van Assche
2023-05-10 5:24 ` [PATCH v3 3/7] ufs: mcq: Add supporting functions for mcq abort Bao D. Nguyen
2023-05-10 21:50 ` Bart Van Assche
2023-05-10 5:24 ` [PATCH v3 4/7] ufs: mcq: Add support for clean up mcq resources Bao D. Nguyen
2023-05-10 22:00 ` Bart Van Assche [this message]
2023-05-10 5:24 ` [PATCH v3 5/7] ufs: mcq: Added ufshcd_mcq_abort() Bao D. Nguyen
2023-05-10 5:24 ` [PATCH v3 6/7] ufs: mcq: Use ufshcd_mcq_poll_cqe_lock() in mcq mode Bao D. Nguyen
2023-05-10 5:24 ` [PATCH v3 7/7] ufs: core: Add error handling for MCQ mode Bao D. Nguyen
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=590cbc0e-51a5-5738-cb2e-7619adf2e4be@acm.org \
--to=bvanassche@acm.org \
--cc=Arthur.Simchaev@wdc.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=quic_asutoshd@quicinc.com \
--cc=quic_cang@quicinc.com \
--cc=quic_nguyenb@quicinc.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
all inboxes | Powered by JetHome®