__func__);
hba->ufshcd_state = UFSHCD_STATE_ERROR;
}
- /*
- * Inform scsi mid-layer that we did reset and allow to handle
- * Unit Attention properly.
- */
- scsi_report_bus_reset(hba->host, 0);
hba->saved_err = 0;
hba->saved_uic_err = 0;
}
{
int ret;
enum uic_link_state old_link_state;
+ enum ufs_pm_level pm_lvl;
bool gating_allowed = !ufshcd_can_fake_clkgating(hba);
hba->pm_op_in_progress = 1;
+ if (ufshcd_is_system_pm(pm_op))
+ pm_lvl = hba->spm_lvl;
+ else
+ pm_lvl = hba->rpm_lvl;
+
+ if (ufs_get_pm_lvl_to_link_pwr_state(pm_lvl) == UIC_LINK_OFF_STATE)
+ hba->uic_link_state = UIC_LINK_OFF_STATE;
old_link_state = hba->uic_link_state;
ufshcd_hba_vreg_set_hpm(hba);