From: Avri Altman <Avri.Altman@wdc.com>
To: Can Guo <cang@codeaurora.org>,
"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
"nguyenb@codeaurora.org" <nguyenb@codeaurora.org>,
"hongwus@codeaurora.org" <hongwus@codeaurora.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"kernel-team@android.com" <kernel-team@android.com>
Cc: 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: Sun, 28 Feb 2021 14:23:22 +0000 [thread overview]
Message-ID: <DM6PR04MB65753665BA9BF63ABF20656FFC9B9@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <1614145010-36079-3-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;
> + }
> +
If in the future, you will enable UFSHCI_QUIRK_BROKEN_HCE on your platform (currently only for Exynos),
Will this code still work?
next prev parent reply other threads:[~2021-02-28 14:24 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 [this message]
2021-03-03 4:07 ` Can Guo
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=DM6PR04MB65753665BA9BF63ABF20656FFC9B9@DM6PR04MB6575.namprd04.prod.outlook.com \
--to=avri.altman@wdc.com \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=cang@codeaurora.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).