Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f056a10a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs-qcom: Abort phy power on sequence if clks are off"

parents 55d9b9d2 767358cd
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -494,6 +494,16 @@ static int ufs_qcom_phy_power_on(struct ufs_hba *hba)
	int ret = 0;

	mutex_lock(&host->phy_mutex);
	if (hba->curr_dev_pwr_mode == UFS_POWERDOWN_PWR_MODE &&
			hba->clk_gating.state != CLKS_ON) {
		ret = -1;
		dev_err(hba->dev, "%s: abort phy power on, clks are off %d\n",
				  __func__, ret);

		mutex_unlock(&host->phy_mutex);

		return ret;
	}
	if (!host->is_phy_pwr_on) {
		ret = phy_power_on(phy);
		if (ret) {