From: Can Guo <cang@codeaurora.org>
To: Avri Altman <Avri.Altman@wdc.com>
Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org,
hongwus@codeaurora.org, linux-scsi@vger.kernel.org,
kernel-team@android.com, Nitin Rawat <nitirawa@codeaurora.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"open list:ARM/QUALCOMM SUPPORT" <linux-arm-msm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] scsi: ufs-qcom: Disable interrupt in reset path
Date: Wed, 03 Mar 2021 12:07:23 +0800 [thread overview]
Message-ID: <96fbfe6fba7a7cd4d2d764186bb8650b@codeaurora.org> (raw)
In-Reply-To: <DM6PR04MB65753665BA9BF63ABF20656FFC9B9@DM6PR04MB6575.namprd04.prod.outlook.com>
On 2021-02-28 22:23, Avri Altman wrote:
>>
>> From: Nitin Rawat <nitirawa@codeaurora.org>
>>
>> Disable interrupt in reset path to flush pending IRQ handler in order
>> to
>> avoid possible NoC issues.
>>
>> Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
>> Signed-off-by: Can Guo <cang@codeaurora.org>
>> ---
>> drivers/scsi/ufs/ufs-qcom.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
>> index f97d7b0..a9dc8d7 100644
>> --- a/drivers/scsi/ufs/ufs-qcom.c
>> +++ b/drivers/scsi/ufs/ufs-qcom.c
>> @@ -253,12 +253,17 @@ static int ufs_qcom_host_reset(struct ufs_hba
>> *hba)
>> {
>> int ret = 0;
>> struct ufs_qcom_host *host = ufshcd_get_variant(hba);
>> + bool reenable_intr = false;
>>
>> if (!host->core_reset) {
>> dev_warn(hba->dev, "%s: reset control not set\n",
>> __func__);
>> goto out;
>> }
>>
>> + reenable_intr = hba->is_irq_enabled;
>> + disable_irq(hba->irq);
>> + hba->is_irq_enabled = false;
>> +
>> ret = reset_control_assert(host->core_reset);
>> if (ret) {
>> dev_err(hba->dev, "%s: core_reset assert failed, err =
>> %d\n",
>> @@ -280,6 +285,11 @@ static int ufs_qcom_host_reset(struct ufs_hba
>> *hba)
>>
>> usleep_range(1000, 1100);
>>
>> + if (reenable_intr) {
>> + enable_irq(hba->irq);
>> + hba->is_irq_enabled = true;
>> + }
>> +
> If in the future, you will enable UFSHCI_QUIRK_BROKEN_HCE on your
> platform (currently only for Exynos),
> Will this code still work?
Yes, it still works.
Thanks,
Can Guo.
next prev parent reply other threads:[~2021-03-03 21:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1614145010-36079-1-git-send-email-cang@codeaurora.org>
2021-02-24 5:36 ` [PATCH v2 2/3] scsi: ufs-qcom: Disable interrupt in reset path Can Guo
2021-02-28 14:23 ` Avri Altman
2021-03-03 4:07 ` Can Guo [this message]
2021-03-03 7:18 ` Avri Altman
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=96fbfe6fba7a7cd4d2d764186bb8650b@codeaurora.org \
--to=cang@codeaurora.org \
--cc=Avri.Altman@wdc.com \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=hongwus@codeaurora.org \
--cc=jejb@linux.ibm.com \
--cc=kernel-team@android.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nguyenb@codeaurora.org \
--cc=nitirawa@codeaurora.org \
/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;
as well as URLs for NNTP newsgroup(s).