Commit d1195471 authored by Manivannan Sadhasivam's avatar Manivannan Sadhasivam Committed by Martin K. Petersen

scsi: ufs: qcom: Fail ufs_qcom_power_up_sequence() when core_reset fails

Even though core_reset is optional, a failure during assert/deassert should
be considered fatal, if core_reset is available. So fail
ufs_qcom_power_up_sequence() if an error happens during reset and also get
rid of the redundant warning as the ufs_qcom_host_reset() function itself
prints error messages.
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20231208065902.11006-8-manivannan.sadhasivam@linaro.org
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 0ae7a027
...@@ -317,9 +317,11 @@ static int ufs_qcom_host_reset(struct ufs_hba *hba) ...@@ -317,9 +317,11 @@ static int ufs_qcom_host_reset(struct ufs_hba *hba)
usleep_range(200, 210); usleep_range(200, 210);
ret = reset_control_deassert(host->core_reset); ret = reset_control_deassert(host->core_reset);
if (ret) if (ret) {
dev_err(hba->dev, "%s: core_reset deassert failed, err = %d\n", dev_err(hba->dev, "%s: core_reset deassert failed, err = %d\n",
__func__, ret); __func__, ret);
return ret;
}
usleep_range(1000, 1100); usleep_range(1000, 1100);
...@@ -359,8 +361,7 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba) ...@@ -359,8 +361,7 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
/* Reset UFS Host Controller and PHY */ /* Reset UFS Host Controller and PHY */
ret = ufs_qcom_host_reset(hba); ret = ufs_qcom_host_reset(hba);
if (ret) if (ret)
dev_warn(hba->dev, "%s: host reset returned %d\n", return ret;
__func__, ret);
/* phy initialization - calibrate the phy */ /* phy initialization - calibrate the phy */
ret = phy_init(phy); ret = phy_init(phy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment