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

Skip to content
Commit c214857a authored by Stanley Chu's avatar Stanley Chu Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet

There is a chance that link enters hibern8 via auto-hibern8 scheme during
the clock-gating flow. Clocks shall not be gated if link is still active
otherwise host or device may hang.

Fix this by returning error code to the caller __ufshcd_setup_clocks() to
skip gating clocks there if link is not confirmed in hibern8 state yet.

Also allow some waiting time for the hibern8 state transition.

Link: https://lore.kernel.org/r/20200601104646.15436-3-stanley.chu@mediatek.com


Reviewed-by: default avatarAndy Teng <andy.teng@mediatek.com>
Signed-off-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>

Bug: 151050916
(cherry picked from commit 9006e3986f6689897c2f1ede2671656b1cb41582)
Change-Id: Ieeccc13fd1f05463344c8f746ba7aa8ff172cd1a
Signed-off-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 767e2644
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