Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 44b78b79 authored by Ziqi Chen's avatar Ziqi Chen Committed by Pranav Vashi
Browse files

scsi: ufs: Fix ufshcd_hold dead loop issue if error recovery is handing



Commit 53c12d0e ("scsi: ufs: fix error recovery after the hibern8
exit failure") would leave hba->clk_gating.active_reqs++ and skip
subsequent actions in ufshcd_hold() if error handling is in progress.
It may cause next ufschcd_release() queue a new clk gate work into
hytimer even though the previous clk gate work has not yet got finish.
Under this corner case, ufshcd_gate_work() may change uic_link_state
to UIC_LINK_HIBERN8_STATE at the heels of setting clk state to CLK_ON
by ufshcd_hold() and then run into ufshcd_hold dead loop. To fix this
issue, we need to ensure there is no any pending and running clk gate
work before changing clk state to CLK_ON in ufshcd_hold().

Change-Id: I25fe35f2cad18f8a77fccf40755d856ee670594d
Signed-off-by: default avatarZiqi Chen <ziqichen@codeaurora.org>
Signed-off-by: default avatarAlexander Winkowski <dereference23@outlook.com>
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
parent 648ade52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment