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:Ziqi Chen <ziqichen@codeaurora.org> Signed-off-by:
Alexander Winkowski <dereference23@outlook.com> Signed-off-by:
Pranav Vashi <neobuddy89@gmail.com>
Loading
Please register or sign in to comment