summaryrefslogtreecommitdiffstats
path: root/drivers/ufs
diff options
context:
space:
mode:
authorCan Guo <quic_cang@quicinc.com>2023-12-02 13:36:13 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2023-12-14 04:37:21 +0100
commita68abdadfe13fa95a306363fa284b5cf0b79776d (patch)
treef9bc0ca1ece295de7ea66292322a6840b46a0224 /drivers/ufs
parentscsi: ufs: ufs-qcom: Set initial PHY gear to max HS gear for HW ver 4 and newer (diff)
downloadlinux-a68abdadfe13fa95a306363fa284b5cf0b79776d.tar.xz
linux-a68abdadfe13fa95a306363fa284b5cf0b79776d.zip
scsi: ufs: ufs-qcom: Check return value of phy_set_mode_ext()
In ufs_qcom_power_up_sequence(), check return value of phy_set_mode_ext() and stop proceeding if phy_set_mode_ext() fails. Reviewed-by: Nitin Rawat <quic_nitirawa@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Can Guo <quic_cang@quicinc.com> Link: https://lore.kernel.org/r/1701520577-31163-8-git-send-email-quic_cang@quicinc.com Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs')
-rw-r--r--drivers/ufs/host/ufs-qcom.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 543939c4c463..ee3f07a9e624 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -475,7 +475,9 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
return ret;
}
- phy_set_mode_ext(phy, mode, host->phy_gear);
+ ret = phy_set_mode_ext(phy, mode, host->phy_gear);
+ if (ret)
+ goto out_disable_phy;
/* power on phy - start serdes and phy's power and clocks */
ret = phy_power_on(phy);