[COMMON] scsi: ufs: Fix problems in clock enable fail and hibern8 fail cases
authorHeonGwang Chu <hg.chu@samsung.com>
Wed, 5 Jul 2017 04:27:05 +0000 (13:27 +0900)
committerJaeHun Jung <jh0801.jung@samsung.com>
Tue, 8 May 2018 08:21:05 +0000 (17:21 +0900)
We delete the clearing of saved_err and saved_uic_err in hibern8 ctrl and
add recovery method when ufs clock enable fail cases.These cases had happened
in the previous soc versions.

Change-Id: Ia8dc78c58cd89030075fb63cc29e015bdb8411fa
Signed-off-by: HeonGwang Chu <hg.chu@samsung.com>
drivers/scsi/ufs/ufshcd.c

index fbf2e95e2a85106179dd528da82bc794b17ba799..06577599c515129bc93e9df2c3ba5e9320618f89 100644 (file)
@@ -4025,16 +4025,8 @@ static int ufshcd_link_hibern8_ctrl(struct ufs_hba *hba, bool en)
        else
                ret = ufshcd_uic_hibern8_exit(hba);
 
-
-       if (ret || (hba->saved_err & INT_FATAL_ERRORS) ||
-               ((hba->saved_err & UIC_ERROR) &&
-               ((hba->saved_uic_err & UFSHCD_UIC_DL_PA_INIT_ERROR) ||
-               (hba->saved_uic_err & UFSHCD_UIC_DL_ERROR)))) {
-
-               if (!ret)
-                       ret = hba->saved_err;
+       if (ret)
                goto out;
-       }
 
        if (hba->monitor.flag & UFSHCD_MONITOR_LEVEL2) {
                if (en)