Skip to content

Commit d119547

Browse files
Mani-Sadhasivammartinkpetersen
authored andcommitted
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: Andrew Halaney <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Andrew Halaney <[email protected]> # sa8775p-ride Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 0ae7a02 commit d119547

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/ufs/host/ufs-qcom.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,11 @@ static int ufs_qcom_host_reset(struct ufs_hba *hba)
317317
usleep_range(200, 210);
318318

319319
ret = reset_control_deassert(host->core_reset);
320-
if (ret)
320+
if (ret) {
321321
dev_err(hba->dev, "%s: core_reset deassert failed, err = %d\n",
322322
__func__, ret);
323+
return ret;
324+
}
323325

324326
usleep_range(1000, 1100);
325327

@@ -359,8 +361,7 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
359361
/* Reset UFS Host Controller and PHY */
360362
ret = ufs_qcom_host_reset(hba);
361363
if (ret)
362-
dev_warn(hba->dev, "%s: host reset returned %d\n",
363-
__func__, ret);
364+
return ret;
364365

365366
/* phy initialization - calibrate the phy */
366367
ret = phy_init(phy);

0 commit comments

Comments
 (0)