ufs: core: Fix runtime suspend error deadlock
Subsystems (3)
PATCH v2 1/1 ufs: core: Fix runtime suspend error deadlock
From: Peter Wang <[email protected]>
Resolve the deadlock issue during runtime suspend when an error triggers the error handler. Prevent the deadlock by checking pm_op_in_progress and performing a quick recovery. This approach ensures that the error handler does not wait indefinitely for runtime PM to resume, allowing runtime suspend to proceed smoothly.
--- drivers/ufs/core/ufshcd.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/ufs/core/ufshcd.c +8 -0
@@ -6681,6 +6681,14 @@ static void ufshcd_err_handler(struct work_struct *work) }spin_unlock_irqrestore (hba->host->host_lock, flags); +ufshcd_rpm_get_noresume (hba); +if (hba->pm_op_in_progress) { +ufshcd_link_recovery (hba); +ufshcd_rpm_put (hba); +return ; + } +ufshcd_rpm_put (hba); +ufshcd_err_handling_prepare (hba);spin_lock_irqsave (hba->host->host_lock, flags);
Signature · 1 line
2.45.2
Quoted 1 line · On 9/25/25 3:22 AM, [email protected] wrote:
Tested-by Bart Van Assche <[email protected]>
Did I ever claim that I tested this patch? I think the Tested-by tag should be removed.
Anyway, since this patch looks good to me:
Quoted 6 lines · Bart Van Assche
External email : Please do not click links or open attachments until you have verified the sender or the content.
On 9/25/25 3:22 AM, [email protected] wrote:
Quoted 8 lines
Quoted 1 line
Tested-by Bart Van Assche <[email protected]>Did I ever claim that I tested this patch? I think the Tested-by tag should be removed.
Anyway, since this patch looks good to me:
Reviewed-by Bart Van Assche <[email protected]>
Hi Bart,
Sorry, I misread previous mail.
I will correct commit message aging.
Thanks.
Peter