scsi: ufs: update ufs command logging infrastructure
This change increases the max command logging capability. It also adds cmd log print if pwr ctrl failure detected. Finally, it changes function name ufshcd_cmd_log_print to ufshchd_print_cmd_log to align with the naming of other ufshcd debug print functions. Change-Id: Ia407b239a0e231c353cccf7e6acf87a5f73d7bd8 Signed-off-by: Can Guo <cang@codeaurora.org>
This commit is contained in:
parent
c0f6993430
commit
196b77384e
1 changed files with 6 additions and 5 deletions
|
@ -518,7 +518,7 @@ static inline void ufshcd_remove_non_printable(char *val)
|
|||
*val = ' ';
|
||||
}
|
||||
|
||||
#define UFSHCD_MAX_CMD_LOGGING 100
|
||||
#define UFSHCD_MAX_CMD_LOGGING 200
|
||||
|
||||
#ifdef CONFIG_TRACEPOINTS
|
||||
static inline void ufshcd_add_command_trace(struct ufs_hba *hba,
|
||||
|
@ -594,7 +594,7 @@ static void ufshcd_dme_cmd_log(struct ufs_hba *hba, char *str, u8 cmd_id)
|
|||
ufshcd_cmd_log(hba, str, "dme", 0xff, cmd_id, 0xff);
|
||||
}
|
||||
|
||||
static void ufshcd_cmd_log_print(struct ufs_hba *hba)
|
||||
static void ufshcd_print_cmd_log(struct ufs_hba *hba)
|
||||
{
|
||||
int i;
|
||||
int pos;
|
||||
|
@ -643,7 +643,7 @@ static void ufshcd_dme_cmd_log(struct ufs_hba *hba, char *str, u8 cmd_id)
|
|||
{
|
||||
}
|
||||
|
||||
static void ufshcd_cmd_log_print(struct ufs_hba *hba)
|
||||
static void ufshcd_print_cmd_log(struct ufs_hba *hba)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
@ -4301,6 +4301,7 @@ out:
|
|||
ufshcd_print_host_state(hba);
|
||||
ufshcd_print_pwr_info(hba);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_print_cmd_log(hba);
|
||||
}
|
||||
|
||||
ufshcd_save_tstamp_of_last_dme_cmd(hba);
|
||||
|
@ -6129,7 +6130,7 @@ static void ufshcd_err_handler(struct work_struct *work)
|
|||
ufshcd_print_host_state(hba);
|
||||
ufshcd_print_pwr_info(hba);
|
||||
ufshcd_print_tmrs(hba, hba->outstanding_tasks);
|
||||
ufshcd_cmd_log_print(hba);
|
||||
ufshcd_print_cmd_log(hba);
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
}
|
||||
}
|
||||
|
@ -6641,7 +6642,7 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
|
|||
hba = shost_priv(host);
|
||||
tag = cmd->request->tag;
|
||||
|
||||
ufshcd_cmd_log_print(hba);
|
||||
ufshcd_print_cmd_log(hba);
|
||||
lrbp = &hba->lrb[tag];
|
||||
err = ufshcd_issue_tm_cmd(hba, lrbp->lun, 0, UFS_LOGICAL_RESET, &resp);
|
||||
if (err || resp != UPIU_TASK_MANAGEMENT_FUNC_COMPL) {
|
||||
|
|
Loading…
Add table
Reference in a new issue