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>,
Arthur Simchaev <Arthur.Simchaev@wdc.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v1 4/4] ufs: mcq: Added ufshcd_mcq_abort()
Date: Wed, 8 Mar 2023 17:35:54 -0800 [thread overview]
Message-ID: <690bbcfe-d6db-f6d1-acea-8ee5aa4ac606@quicinc.com> (raw)
In-Reply-To: <e354dece-5dc8-9cdc-b822-59a1e0f3a9c3@acm.org>
On 3/8/2023 3:25 PM, Bart Van Assche wrote:
> On 3/8/23 14:37, Bao D. Nguyen wrote:
>> On 3/8/2023 11:02 AM, Bart Van Assche wrote:
>>> On 3/7/23 20:01, Bao D. Nguyen wrote:
>>>> + if (ufshcd_mcq_cqe_search(hba, hwq, tag)) {
>>>> + dev_err(hba->dev, "%s: cmd found in cq. hwq=%d, tag=%d\n",
>>>> + __func__, hwq->id, tag);
>>>> + /*
>>>> + * The command should not be 'stuck' in the CQ for such a
>>>> long time.
>>>> + * Is interrupt missing? Process the CQEs here. If the
>>>> interrupt is
>>>> + * invoked at a later time, the CQ will be empty because
>>>> the CQEs
>>>> + * are already processed here.
>>>> + */
>>>> + ufshcd_mcq_poll_cqe_lock(hba, hwq);
>>>> + err = SUCCESS;
>>>> + goto out;
>>>> + }
>>>
>>> Please remove the above code and also the definition of the
>>> ufshcd_mcq_cqe_search() function. The SCSI error handler submits an
>>> abort to deal with command processing timeouts.
>>> ufshcd_mcq_cqe_search() can only return true in case of a software
>>> bug at the host side. Addressing such bugs is out of scope for the
>>> SCSI error handler.
>>
>> This is an attempt to handle the error case similar to SDB mode where
>> it prints "%s: cmd was completed, but without a notifying intr, tag =
>> %d" in the ufshcd_abort() function.
>>
>> In this case the command has been completed by the hardware, but some
>> reasons the software has not processed it. We have seen this print
>> happened during debug sessions, so the error case does happen in SBL
>> mode.
>>
>> Are you suggesting we should return error in this case without
>> calling ufshcd_mcq_poll_cqe_lock()?
>
> What I am asking is to remove ufshcd_mcq_poll_cqe_lock() and all code
> that depends on that function returning true. Although such code might
> be useful for SoC debugging, helping with SoC debugging is out of
> scope for Linux kernel drivers.
I will remove it. In that case, we don't need the first patch of this
series, so I will remove the first patch as well. Thanks.
>
> Thanks,
>
> Bart.
>
next prev parent reply other threads:[~2023-03-09 1:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1678247309.git.quic_nguyenb@quicinc.com>
2023-03-08 4:01 ` [RFC PATCH v1 1/4] ufs: mcq: Use ufshcd_mcq_poll_cqe_lock() in mcq mode Bao D. Nguyen
2023-03-08 4:01 ` [RFC PATCH v1 2/4] ufs: mcq: Add supporting functions for mcq abort Bao D. Nguyen
2023-03-08 18:48 ` Bart Van Assche
2023-03-08 22:27 ` Bao D. Nguyen
2023-03-08 23:23 ` Bart Van Assche
2023-03-08 23:52 ` Bao D. Nguyen
2023-03-08 4:01 ` [RFC PATCH v1 3/4] ufs: mcq: Add support for clean up mcq resources Bao D. Nguyen
2023-03-08 18:53 ` Bart Van Assche
2023-03-08 22:27 ` Bao D. Nguyen
2023-03-08 4:01 ` [RFC PATCH v1 4/4] ufs: mcq: Added ufshcd_mcq_abort() Bao D. Nguyen
2023-03-08 19:02 ` Bart Van Assche
2023-03-08 22:37 ` Bao D. Nguyen
2023-03-08 23:25 ` Bart Van Assche
2023-03-09 1:35 ` Bao D. Nguyen [this message]
2023-03-09 3:10 ` Stanley Chu
2023-03-09 5:31 ` Bao D. Nguyen
2023-03-09 6:21 ` Stanley Chu
2023-03-09 6:59 ` 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=690bbcfe-d6db-f6d1-acea-8ee5aa4ac606@quicinc.com \
--to=quic_nguyenb@quicinc.com \
--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=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®