From: Can Guo <cang@codeaurora.org>
To: asutoshd@codeaurora.org, nguyenb@codeaurora.org,
hongwus@codeaurora.org, linux-scsi@vger.kernel.org,
kernel-team@android.com, cang@codeaurora.org
Cc: Nitin Rawat <nitirawa@codeaurora.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 2/3] scsi: ufs-qcom: Disable interrupt in reset path
Date: Tue, 23 Feb 2021 21:36:48 -0800 [thread overview]
Message-ID: <1614145010-36079-3-git-send-email-cang@codeaurora.org> (raw)
In-Reply-To: <1614145010-36079-1-git-send-email-cang@codeaurora.org>
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;
+ }
+
out:
return ret;
}
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2021-02-24 5:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 5:36 [PATCH v2 0/3] Three minor changes related with error handling Can Guo
2021-02-24 5:36 ` [PATCH v2 1/3] scsi: ufs: Minor adjustments to " Can Guo
2021-03-03 7:22 ` Avri Altman
2021-03-03 10:03 ` Can Guo
2021-03-03 10:06 ` Can Guo
2021-03-03 11:43 ` Avri Altman
2021-02-24 5:36 ` Can Guo [this message]
2021-02-28 14:23 ` [PATCH v2 2/3] scsi: ufs-qcom: Disable interrupt in reset path Avri Altman
2021-03-03 4:07 ` Can Guo
2021-03-03 7:18 ` Avri Altman
2021-02-24 5:36 ` [PATCH v2 3/3] scsi: ufs: Remove redundant checks of !hba in suspend/resume callbacks Can Guo
2021-03-03 7:19 ` Avri Altman
2021-03-04 4:16 ` [PATCH v2 0/3] Three minor changes related with error handling Martin K. Petersen
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=1614145010-36079-3-git-send-email-cang@codeaurora.org \
--to=cang@codeaurora.org \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.