From: hgchu Date: Fri, 12 Jan 2018 08:02:21 +0000 (+0900) Subject: [COMMON] scsi: ufs: exynos: Add reset ctrl for ufs sleep/wake X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf632748c909427ed981b685da6dc88e2b18c52a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [COMMON] scsi: ufs: exynos: Add reset ctrl for ufs sleep/wake Change-Id: I2a26c1690a211dd3d040fe6b37c6e43c39d2fa9b Signed-off-by: hgchu --- diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c08eda7be543..224d75dc75dc 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -3830,6 +3830,7 @@ out: /* Dump debugging information to system memory */ if (ret) { ufshcd_vops_dbg_register_dump(hba); + exynos_ufs_show_uic_info(hba); ufshcd_print_host_state(hba); ufshcd_print_pwr_info(hba); ufshcd_print_host_regs(hba); @@ -4879,6 +4880,9 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) ufshcd_is_exception_event(lrbp->ucd_rsp_ptr) && scsi_host_in_recovery(hba->host)) { schedule_work(&hba->eeh_work); + dev_info(hba->dev, "execption event reported\n"); + } + break; case UPIU_TRANSACTION_REJECT_UPIU: /* TODO: handle Reject UPIU Response */ @@ -5218,8 +5222,12 @@ static int ufshcd_bkops_ctrl(struct ufs_hba *hba, goto out; } - if (curr_status >= status) + if (curr_status >= status) { err = ufshcd_enable_auto_bkops(hba); + if (!err) + dev_info(hba->dev, "%s: auto_bkops enabled, status : %d\n", + __func__, curr_status); + } else err = ufshcd_disable_auto_bkops(hba); out: @@ -5423,6 +5431,7 @@ static void ufshcd_err_handler(struct work_struct *work) hba->ufshcd_state = UFSHCD_STATE_RESET; ufshcd_set_eh_in_progress(hba); + exynos_ufs_show_uic_info(hba); /* Complete requests that have door-bell cleared by h/w */ ufshcd_complete_requests(hba); @@ -8035,6 +8044,8 @@ disable_clks: */ ufshcd_disable_irq(hba); + ufshcd_vreg_set_lpm(hba); + udelay(50); if (gating_allowed) { if (!ufshcd_is_link_active(hba))