scsi: ufs: Adjust logic in common ADAPT helper
Subsystems (2)
PATCH 1/1 scsi: ufs: Adjust logic in common ADAPT helper
The introduction of ufshcd_dme_configure_adapt() refactored out duplication from the Mediatek and Qualcomm drivers.
Both these implementations had the logic of:
gear_tx == UFS_HS_G4 => PA_INITIAL_ADAPT
gear_tx != UFS_HS_G4 => PA_NO_ADAPTbut now both implementations pass PA_INITIAL_ADAPT as "adapt_val" and if gear_tx is not UFS_HS_G4 that is replaced with PA_INITIAL_ADAPT. In other words, it's PA_INITIAL_ADAPT in both above cases.
The result is that e.g. Qualcomm SM8150 has no longer functional UFS, so adjust the logic to match the previous implementation.
--- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +1 -1
@@ -3618,7 +3618,7 @@ int ufshcd_dme_configure_adapt(struct ufs_hba *hba,int ret;if (agreed_gear !=UFS_HS_G4 ) - adapt_val =PA_INITIAL_ADAPT ; + adapt_val =PA_NO_ADAPT ; ret = ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXHSADAPTTYPE),
Signature · 1 line
2.28.0
Quoted 11 lines · Bjorn Andersson
The introduction of
ufshcd_dme_configure_adapt()refactored out duplication from the Mediatek and Qualcomm drivers.Both these implementations had the logic of:
gear_tx == UFS_HS_G4 => PA_INITIAL_ADAPT gear_tx != UFS_HS_G4 => PA_NO_ADAPTbut now both implementations pass
PA_INITIAL_ADAPTas "adapt_val" and ifgear_txis notUFS_HS_G4that is replaced withPA_INITIAL_ADAPT. In other words, it'sPA_INITIAL_ADAPTin both above cases.
Quoted 5 lines
The result is that e.g. Qualcomm SM8150 has no longer functional UFS, so adjust the logic to match the previous implementation.
Fixes fc85a74e28fe ("scsi: ufs: Refactor ADAPT configuration function")Signed-off-by Bjorn Andersson <[email protected]>
Thanks for the fix.
Quoted 11 lines · Bjorn Andersson
The introduction of
ufshcd_dme_configure_adapt()refactored out duplication from the Mediatek and Qualcomm drivers.Both these implementations had the logic of:
gear_tx == UFS_HS_G4 => PA_INITIAL_ADAPT gear_tx != UFS_HS_G4 => PA_NO_ADAPTbut now both implementations pass
PA_INITIAL_ADAPTas "adapt_val" and ifgear_txis notUFS_HS_G4that is replaced withPA_INITIAL_ADAPT. In other words, it'sPA_INITIAL_ADAPTin both above cases.
Quoted 5 lines
The result is that e.g. Qualcomm SM8150 has no longer functional UFS, so adjust the logic to match the previous implementation.
Fixes fc85a74e28fe ("scsi: ufs: Refactor ADAPT configuration function")Signed-off-by Bjorn Andersson <[email protected]>
Quoted 18 lines
--- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/ufs/ufshcd.c +1
-1@@ -3618,7 +3618,7 @@ int ufshcd_dme_configure_adapt(struct ufs_hba *hba, int ret;if (agreed_gear !=UFS_HS_G4 ) - adapt_val =PA_INITIAL_ADAPT ; + adapt_val =PA_NO_ADAPT ; ret = ufshcd_dme_set(hba,
UIC_ARG_MIB(PA_TXHSADAPTTYPE),
Martin K. Petersen
AppliedBjorn,
Quoted 2 lines
The introduction of
ufshcd_dme_configure_adapt()refactored out duplication from the Mediatek and Qualcomm drivers.
Applied to 5.11/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · Bjorn Andersson
The introduction of
ufshcd_dme_configure_adapt()refactored out duplication from the Mediatek and Qualcomm drivers.Both these implementations had the logic of:
gear_tx == UFS_HS_G4 => PA_INITIAL_ADAPT gear_tx != UFS_HS_G4 => PA_NO_ADAPT[...]
Applied to 5.11/scsi-queue, thanks!
[1/1] scsi: ufs: Adjust logic in common ADAPT helper
https://git.kernel.org/mkp/scsi/c/66df79ccbc2f
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
This patch was applied to qcom/linux.git (refs/heads/for-next):
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
Quoted 8 lines · On Fri, 20 Nov 2020 20:48:10 -0800 you wrote:
The introduction of
ufshcd_dme_configure_adapt()refactored out duplication from the Mediatek and Qualcomm drivers.Both these implementations had the logic of:
gear_tx == UFS_HS_G4 => PA_INITIAL_ADAPT gear_tx != UFS_HS_G4 => PA_NO_ADAPT[...]
Here is the summary with links:
- scsi: ufs: Adjust logic in common ADAPT helper
https://git.kernel.org/qcom/c/66df79ccbc2f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html