Skip to content

Commit 4a79157

Browse files
Nitin Rawatmartinkpetersen
authored andcommitted
scsi: ufs: ufs-qcom: Disable interrupt in reset path
Disable interrupt in reset path to flush pending IRQ handler in order to avoid possible NoC issues. Link: https://lore.kernel.org/r/1614145010-36079-3-git-send-email-cang@codeaurora.org Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org> Signed-off-by: Can Guo <cang@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent aa53f58 commit 4a79157

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/scsi/ufs/ufs-qcom.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,17 @@ static int ufs_qcom_host_reset(struct ufs_hba *hba)
253253
{
254254
int ret = 0;
255255
struct ufs_qcom_host *host = ufshcd_get_variant(hba);
256+
bool reenable_intr = false;
256257

257258
if (!host->core_reset) {
258259
dev_warn(hba->dev, "%s: reset control not set\n", __func__);
259260
goto out;
260261
}
261262

263+
reenable_intr = hba->is_irq_enabled;
264+
disable_irq(hba->irq);
265+
hba->is_irq_enabled = false;
266+
262267
ret = reset_control_assert(host->core_reset);
263268
if (ret) {
264269
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)
280285

281286
usleep_range(1000, 1100);
282287

288+
if (reenable_intr) {
289+
enable_irq(hba->irq);
290+
hba->is_irq_enabled = true;
291+
}
292+
283293
out:
284294
return ret;
285295
}

0 commit comments

Comments
 (0)