Right now, we're blindly returning success even if waking the link fails during clock scaling. This is a mess because the core then tries to send SCSI commands to a dead link, causing huge timeouts.
Just return the actual error so the core can catch the failure and roll back properly.
Signed-off-by: Josh Law <objecting@objecting.org>
---
drivers/ufs/host/ufs-qcom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 375fd24ba458..5d33a921a22f 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1750,10 +1750,10 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba, bool scale_up,
}
ufs_qcom_icc_update_bw(host);
- ufshcd_uic_hibern8_exit(hba);
+ err = ufshcd_uic_hibern8_exit(hba);
}
- return 0;
+ return err;
}
static void ufs_qcom_enable_test_bus(struct ufs_qcom_host *host)
--
2.34.1