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:
Nitin Rawat <nitirawa@codeaurora.org>
Loading
Please register or sign in to comment