mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
scsi: ufs: Increase the PA_HIBERN8TIME on the host
The device advertises PA_HIBERN8TIME may not be enough for some UFS
devices. To workaround this issue, host should add more 100 us.
The commit 8941234ea1 ("scsi: ufs: Add UFS_DEVICE_QUIRK_PA_HIBER8TIME
quirk") just increase PA_HIBERN8TIME base on TX_HIBERN8TIME_CAPABILITY,
we should increase PA_HIBERN8TIME directly because the
RX_HIBERN8TIME_CAPABILITY may be more than TX_HIBERN8TIME_CAPABILITY.
Change-Id: If5e28e11a656df999fc50014e65bc89498b28499
Signed-off-by: Ziqi Chen <ziqichen@codeaurora.org>
This commit is contained in:
parent
787ab105df
commit
06efe84d5f
1 changed files with 5 additions and 6 deletions
|
|
@ -1808,19 +1808,18 @@ static void ufshcd_parse_pm_levels(struct ufs_hba *hba)
|
|||
static void ufs_qcom_override_pa_h8time(struct ufs_hba *hba)
|
||||
{
|
||||
int ret;
|
||||
u32 loc_tx_h8time_cap = 0;
|
||||
u32 pa_h8time = 0;
|
||||
|
||||
ret = ufshcd_dme_get(hba, UIC_ARG_MIB_SEL(TX_HIBERN8TIME_CAPABILITY,
|
||||
UIC_ARG_MPHY_TX_GEN_SEL_INDEX(0)),
|
||||
&loc_tx_h8time_cap);
|
||||
ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_HIBERN8TIME),
|
||||
&pa_h8time);
|
||||
if (ret) {
|
||||
dev_err(hba->dev, "Failed getting max h8 time: %d\n", ret);
|
||||
dev_err(hba->dev, "Failed getting PA_HIBERN8TIME time: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* 1 implies 100 us */
|
||||
ret = ufshcd_dme_set(hba, UIC_ARG_MIB(PA_HIBERN8TIME),
|
||||
loc_tx_h8time_cap + 1);
|
||||
pa_h8time + 1);
|
||||
if (ret)
|
||||
dev_err(hba->dev, "Failed updating PA_HIBERN8TIME: %d\n", ret);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue