Commit 17add8fe authored by Nitin Rawat's avatar Nitin Rawat Committed by Gerrit - the friendly Code Review server
Browse files

scsi: ufs: Resume ufs host before accessing controller register



Ensure hba's power runtime status is active before accessing
auto hibern8 timer register.
To guarantee this, add pm_runtime_get/put_sync()
before call is made to access the register.

There might be scenarios where userspace is trying
to access the UFS exposed API to change the value of
auto hiber8 timer when hba power runtime status could
be either RPM_RESUMING or RPM_SUSPENDED. so in
these cases, when hibern8 exit is sent to device ,
since device has not yet resumed, we
see hiber8 failure with reason as power fatal error.

To fix this always calls pm_runtime_get_sync
which ensures device is in active status before
first command is sent to device .

Change-Id: Icfcb3d9cf2b30bbc23fdc18e3aaca2c933024854
Signed-off-by: default avatarNitin Rawat <nitirawa@codeaurora.org>
parent 8e147e38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment