diff options
| author | Sayali Lokhande <sayalil@codeaurora.org> | 2017-12-08 15:35:23 +0530 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2019-12-23 23:43:33 +0200 |
| commit | 56c3690e7a3086899bafa56f32aa890fae48d8a9 (patch) | |
| tree | 9ae52822933c3d8a42b30e4094d9fc13e9d1856e /scripts/cleanpatch | |
| parent | 6afc54174e5a1b726f6650a0e8c0b7c74d80c2bb (diff) | |
scsi: ufs: Avoid deadlock in suspend and eeh_work
In case of an exception, there could be a deadlock:
eeh_work:
-002|schedule()
-003|spin_lock_irq()
-003|rpm_resume << pm_runtime_get_sync(hba->dev);
-004|__pm_runtime_resume()
-005|ufshcd_scsi_block_requests()
-005|ufshcd_exception_event_handler()
ufshcd_suspend:
-002|schedule()
-003|schedule_timeout()
-004|do_wait_for_common()
-004|__wait_for_common()
-004|wait_for_common()
-005|wait_for_completion()
-006|destroy_work_on_stack()
-006|flush_work(?) << eeh_work
-007|ufshcd_suspend()
-008|ufshcd_runtime_suspend()
-009|ufshcd_pltfrm_runtime_suspend()
-010|pm_generic_runtime_suspend()
-011|__rpm_callback()
Scenario looks like :
1.Hba->eeh_work starts to work and at the almost same
time ufshcd_runtime_suspend start to work by rpm core.
2.pm_runtime_get_sync in eeh_work remains pending as
rpm_status is RPM_SUSPENDING due to ufshcd_runtime_suspend.
To fix this, call pm_runtime_get_noresume() once eeh_work
is scheduled so that suspend cannot be invoked during
exception work.
Change-Id: Ib212f71e22f063dad9c6ccca4aa8f7261e568b51
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Diffstat (limited to 'scripts/cleanpatch')
0 files changed, 0 insertions, 0 deletions
