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

Skip to content
Commit 20891d1b authored by Nitin Rawat's avatar Nitin Rawat
Browse files

scsi: ufs: Fix clock gating issue



commit <f0e7e5ba> ("Avoid potential lrb race caused by early
release of lrb_in_use") holds lrb_in_use till all operations
of lrbp is finished to avoid the potential race with
the next task which may use the same lrbp in some corner
case. As part of this change, clear_bit_unlock API
was moved down just before scsi_done call.

Due to which _ufshcd_release is called before we reset the bit
for particular request tag in hba->lrb_in_use flag.
Hence for the last request in completion handler, _ufshcd_release
is called with non zero value of hba->lrb_in_use and hence its
return without scheduling the hr timer to start the gate work.
Due to which clock are not getting turned off and it remains
on till runtime suspend kicks in. This is causing ufs
power consumption issue.

To fix this, move down __ufshcd_release and
__ufshcd_hibern8_release function after the clear_bit_unlock,
so that __ufshcd_release will be called with updated
value of hba->lrb_in_use flag .

Change-Id: I3b42bcd1f7bf12adb3e769154de221d700defa2c
Signed-off-by: default avatarNitin Rawat <nitirawa@codeaurora.org>
parent e39cf4ae
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