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

Commit 7a9ab209 authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

scsi: ufs: fix possible unclocked register access during hibern8 exit



ufshcd_queuecommand() function calls ufshcd_hibern8_hold() to bring the
link out of hibern8 asynchronously. If the link was in hibern8 state then
it schedules a work to execute the hibern8 without any timeout and returns
error back to ufshcd_queuecommand(). ufshcd_queuecommand() calls
ufshcd_release() which schedules the clock gating work to be executed
after clock gating timeout (50ms at this moment). Ideally hibern8 exit
work should have finished much before clock gating work starts execution
but it may not be true on heavily loaded system. To protect this race,
hibern8 exit work should make sure that clocks are running (by calling
ufshcd_hold()) before executing hibern8 exit.

Change-Id: I572b26881277886f5ec17b0eed96ee9e59ca1fbf
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent 8e7973e2
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