Merge "scsi: ufs: Add counter for hibernate and gear switch"

This commit is contained in:
Linux Build Service Account 2017-11-30 14:02:13 -08:00 committed by Gerrit - the friendly Code Review server
commit dc25cb3595
3 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -950,6 +950,10 @@ static int ufsdbg_show_hba_show(struct seq_file *file, void *data)
seq_printf(file, "hba->saved_err = 0x%x\n", hba->saved_err);
seq_printf(file, "hba->saved_uic_err = 0x%x\n", hba->saved_uic_err);
seq_printf(file, "power_mode_change_cnt = %d\n",
hba->ufs_stats.power_mode_change_cnt);
seq_printf(file, "hibern8_exit_cnt = %d\n",
hba->ufs_stats.hibern8_exit_cnt);
return 0;
}

View file

@ -4729,6 +4729,7 @@ int ufshcd_change_power_mode(struct ufs_hba *hba,
memcpy(&hba->pwr_info, pwr_mode,
sizeof(struct ufs_pa_layer_attr));
hba->ufs_stats.power_mode_change_cnt++;
}
return ret;
@ -7450,9 +7451,6 @@ static void ufshcd_clear_dbg_ufs_stats(struct ufs_hba *hba)
{
int err_reg_hist_size = sizeof(struct ufs_uic_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);

View file

@ -638,6 +638,7 @@ struct ufs_stats {
struct ufshcd_clk_ctx clk_rel;
u32 hibern8_exit_cnt;
ktime_t last_hibern8_exit_tstamp;
u32 power_mode_change_cnt;
struct ufs_uic_err_reg_hist pa_err;
struct ufs_uic_err_reg_hist dl_err;
struct ufs_uic_err_reg_hist nl_err;