summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufs-qcom.c
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2021-04-05 22:57:29 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2021-04-05 22:57:29 -0400
commit556666bce111b2a758010c2a2a6bab7f3770f4de (patch)
tree3a35ea6f9a9aa43b82166afc1f329084dd55c729 /drivers/scsi/ufs/ufs-qcom.c
parent4e2e619f3c9e3c49859f085995554a53e9fc0e02 (diff)
parent9e67600ed6b8565da4b85698ec659b5879a6c1c6 (diff)
downloadlinux-556666bce111b2a758010c2a2a6bab7f3770f4de.tar.bz2
Merge branch '5.12/scsi-fixes' into 5.13/scsi-staging
Pull 5.12/scsi-fixes into the 5.13 SCSI tree to provide a baseline for some UFS changes that would otherwise cause conflicts during the merge. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-qcom.c')
-rw-r--r--drivers/scsi/ufs/ufs-qcom.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 2d54dce0eeda..9b711d6aac54 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;
}