summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs
diff options
context:
space:
mode:
authorVenkat Gopalakrishnan <venkatg@codeaurora.org>2017-02-13 17:57:51 -0800
committerVenkat Gopalakrishnan <venkatg@codeaurora.org>2017-02-14 10:59:02 -0800
commita32405cd87460b6d690225492930d1448ff93f53 (patch)
treee7dd56a72f08ccba36579b20d2b369fcfe1403e1 /drivers/scsi/ufs
parent3a7e752617514960c5cecdf84e12b13dc63c04c7 (diff)
scsi: ufs: handle LINERESET error only during hibern8 enter
If LINERESET was detected during hibern8 exit, HW recovers link back to original speed automatically by PA_INIT sequence, hence remove the full reset. Change-Id: I181adf4580c0febed817047a40c1d0621d9c9824 Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Diffstat (limited to 'drivers/scsi/ufs')
-rw-r--r--drivers/scsi/ufs/ufshcd.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index bf357b50e798..9dea46909a52 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -4332,13 +4332,9 @@ int ufshcd_uic_hibern8_exit(struct ufs_hba *hba)
ret = ufshcd_uic_pwr_ctrl(hba, &uic_cmd);
trace_ufshcd_profile_hibern8(dev_name(hba->dev), "exit",
ktime_to_us(ktime_sub(ktime_get(), start)), ret);
- /*
- * Do full reinit if exit failed or if LINERESET was detected during
- * Hibern8 operation. After LINERESET, link moves to default PWM-G1
- * mode hence full reinit is required to move link to HS speeds.
- */
- if (ret || hba->full_init_linereset) {
- hba->full_init_linereset = false;
+
+ /* Do full reinit if exit failed */
+ if (ret) {
ufshcd_update_error_stats(hba, UFS_ERR_HIBERN8_EXIT);
dev_err(hba->dev, "%s: hibern8 exit failed. ret = %d",
__func__, ret);
@@ -6083,14 +6079,16 @@ static irqreturn_t ufshcd_update_uic_error(struct ufs_hba *hba)
__func__, reg);
ufshcd_update_uic_reg_hist(&hba->ufs_stats.pa_err, reg);
- /* Don't ignore LINERESET indication during hibern8 operation */
+ /*
+ * Don't ignore LINERESET indication during hibern8
+ * enter operation.
+ */
if (reg & UIC_PHY_ADAPTER_LAYER_GENERIC_ERROR) {
struct uic_command *cmd = hba->active_uic_cmd;
if (cmd) {
- if ((cmd->command == UIC_CMD_DME_HIBER_ENTER)
- || (cmd->command == UIC_CMD_DME_HIBER_EXIT)) {
- dev_err(hba->dev, "%s: LINERESET during hibern8, reg 0x%x\n",
+ if (cmd->command == UIC_CMD_DME_HIBER_ENTER) {
+ dev_err(hba->dev, "%s: LINERESET during hibern8 enter, reg 0x%x\n",
__func__, reg);
hba->full_init_linereset = true;
}