summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs
diff options
context:
space:
mode:
authorStanley Chu <stanley.chu@mediatek.com>2019-07-10 15:38:20 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-07-22 22:44:06 +0200
commitc5397f13fc744b15fc9ad5df27172885e2303c39 (patch)
tree5326ea533ad76f48ce0eee538710e0be0573a483 /drivers/scsi/ufs
parentscsi: ufs: Add fatal and auto-hibern8 error history (diff)
downloadlinux-c5397f13fc744b15fc9ad5df27172885e2303c39.tar.xz
linux-c5397f13fc744b15fc9ad5df27172885e2303c39.zip
scsi: ufs: Do not reset error history during host reset
Currently UFS error history will be reset and lost during host reset flow by ufschd_probe_hba(). Avoid resetting it so error history can be kept as complete as possible to improve debugging. In addition, fix a minor display error in ufshcd_print_err_hist(). [mkp: commit desc clarification] Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs')
-rw-r--r--drivers/scsi/ufs/ufshcd.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 46815e704396..f272ec3cad58 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -402,7 +402,7 @@ static void ufshcd_print_err_hist(struct ufs_hba *hba,
if (err_hist->reg[p] == 0)
continue;
- dev_err(hba->dev, "%s[%d] = 0x%x at %lld us\n", err_name, i,
+ dev_err(hba->dev, "%s[%d] = 0x%x at %lld us\n", err_name, p,
err_hist->reg[p], ktime_to_us(err_hist->tstamp[p]));
found = true;
}
@@ -6689,19 +6689,8 @@ static void ufshcd_tune_unipro_params(struct ufs_hba *hba)
static void ufshcd_clear_dbg_ufs_stats(struct ufs_hba *hba)
{
- int err_reg_hist_size = sizeof(struct ufs_err_reg_hist);
-
hba->ufs_stats.hibern8_exit_cnt = 0;
hba->ufs_stats.last_hibern8_exit_tstamp = ktime_set(0, 0);
-
- memset(&hba->ufs_stats.pa_err, 0, err_reg_hist_size);
- memset(&hba->ufs_stats.dl_err, 0, err_reg_hist_size);
- memset(&hba->ufs_stats.nl_err, 0, err_reg_hist_size);
- memset(&hba->ufs_stats.tl_err, 0, err_reg_hist_size);
- memset(&hba->ufs_stats.dme_err, 0, err_reg_hist_size);
- memset(&hba->ufs_stats.fatal_err, 0, err_reg_hist_size);
- memset(&hba->ufs_stats.auto_hibern8_err, 0, err_reg_hist_size);
-
hba->req_abort_count = 0;
}