]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: disable irq before disabling clocks
authorStanley Chu <stanley.chu@mediatek.com>
Sat, 7 Dec 2019 12:22:00 +0000 (20:22 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Dec 2019 03:08:54 +0000 (22:08 -0500)
commit50c1e1506fa738a2ce7c61c836a447291bee9be6
treeb4781c91d8fc778a8eb3d942dc59279d5bd88555
parentf7d2ca76dc84a3c01fcc866b38dde4acc6f439b9
scsi: ufs: disable irq before disabling clocks

During suspend flow, interrupt shall be disabled before disabling clocks to
avoid potential system hang due to accessing host registers after host
clocks are disabled.

For example, if an interrupt comes with IRQF_IRQPOLL flag configured with
the misrouted interrupt recovery feature enabled, ufshcd ISR may be
triggered even if nothing shall be done for UFS. In this case, system hang
may happen if UFS interrupt status register is accessed with host clocks
disabled.

Link: https://lore.kernel.org/r/1575721321-8071-2-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c