From: "Bao D. Nguyen" <quic_nguyenb@quicinc.com>
To: Bart Van Assche <bvanassche@acm.org>, <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>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 7/7] ufs: core: Add error handling for MCQ mode
Date: Fri, 19 May 2023 17:11:53 -0700 [thread overview]
Message-ID: <0b7cccc6-df1f-8720-0704-4eb7bc2e781b@quicinc.com> (raw)
In-Reply-To: <5065e9ca-d5ce-22fc-4089-651cfacb7166@acm.org>
On 5/19/2023 4:03 PM, Bart Van Assche wrote:
> On 5/11/23 23:28, Bao D. Nguyen wrote:
>> @@ -6378,18 +6407,36 @@ static bool ufshcd_abort_all(struct ufs_hba *hba)
>> bool needs_reset = false;
>> int tag, ret;
>> - /* Clear pending transfer requests */
>> - for_each_set_bit(tag, &hba->outstanding_reqs, hba->nutrs) {
>> - ret = ufshcd_try_to_abort_task(hba, tag);
>> - dev_err(hba->dev, "Aborting tag %d / CDB %#02x %s\n", tag,
>> - hba->lrb[tag].cmd ? hba->lrb[tag].cmd->cmnd[0] : -1,
>> - ret ? "failed" : "succeeded");
>> - if (ret) {
>> - needs_reset = true;
>> - goto out;
>> + if (is_mcq_enabled(hba)) {
>> + struct ufshcd_lrb *lrbp;
>> + int tag;
>> +
>> + for (tag = 0; tag < hba->nutrs; tag++) {
>> + lrbp = &hba->lrb[tag];
>> + if (!ufshcd_cmd_inflight(lrbp->cmd))
>> + continue;
>> + ret = ufshcd_try_to_abort_task(hba, tag);
>> + dev_err(hba->dev, "Aborting tag %d / CDB %#02x %s\n", tag,
>> + hba->lrb[tag].cmd ? hba->lrb[tag].cmd->cmnd[0] : -1,
>> + ret ? "failed" : "succeeded");
>> + if (ret) {
>> + needs_reset = true;
>> + goto out;
>> + }
>> + }
>> + } else {
>> + /* Clear pending transfer requests */
>> + for_each_set_bit(tag, &hba->outstanding_reqs, hba->nutrs) {
>> + ret = ufshcd_try_to_abort_task(hba, tag);
>> + dev_err(hba->dev, "Aborting tag %d / CDB %#02x %s\n", tag,
>> + hba->lrb[tag].cmd ? hba->lrb[tag].cmd->cmnd[0] : -1,
>> + ret ? "failed" : "succeeded");
>> + if (ret) {
>> + needs_reset = true;
>> + goto out;
>> + }
>> }
>> }
>
> Please move the ufshcd_cmd_inflight() check into ufshcd_try_to_abort_task()
> such that the same code path can be used for MCQ and legacy mode.
Thank you, Bart.
I will make the change.
Thanks
Bao
>
> Thanks,
>
> Bart.
next prev parent reply other threads:[~2023-05-20 0:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1683872601.git.quic_nguyenb@quicinc.com>
2023-05-12 6:28 ` [PATCH v5 1/7] ufs: core: Combine 32-bit command_desc_base_addr_lo/hi Bao D. Nguyen
2023-05-19 22:46 ` Bart Van Assche
2023-05-12 6:28 ` [PATCH v5 2/7] ufs: core: Update the ufshcd_clear_cmds() functionality Bao D. Nguyen
2023-05-19 22:53 ` Bart Van Assche
2023-05-12 6:28 ` [PATCH v5 3/7] ufs: mcq: Add supporting functions for mcq abort Bao D. Nguyen
2023-05-19 22:56 ` Bart Van Assche
2023-05-12 6:28 ` [PATCH v5 4/7] ufs: mcq: Add support for clean up mcq resources Bao D. Nguyen
2023-05-19 22:58 ` Bart Van Assche
2023-05-12 6:28 ` [PATCH v5 5/7] ufs: mcq: Added ufshcd_mcq_abort() Bao D. Nguyen
2023-05-17 3:15 ` Stanley Chu
2023-05-17 3:25 ` Bao D. Nguyen
2023-05-12 6:28 ` [PATCH v5 6/7] ufs: mcq: Use ufshcd_mcq_poll_cqe_lock() in mcq mode Bao D. Nguyen
2023-05-19 22:59 ` Bart Van Assche
2023-05-12 6:28 ` [PATCH v5 7/7] ufs: core: Add error handling for MCQ mode Bao D. Nguyen
2023-05-19 23:03 ` Bart Van Assche
2023-05-20 0:11 ` Bao D. Nguyen [this message]
2023-05-23 6:58 ` Bao D. Nguyen
2023-05-22 6:48 ` Stanley Chu
2023-05-22 6:56 ` Stanley Chu
2023-05-23 7:01 ` 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=0b7cccc6-df1f-8720-0704-4eb7bc2e781b@quicinc.com \
--to=quic_nguyenb@quicinc.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--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=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®