ANDROID: scsi: ufs: add hooks to track ufs commands
This adds some missing hooks for ufs commands, including request, query, uic, task manager commands, and interrupt events for vendor. Those can be used for vendor module to understand command history. Bug: 172305874 Bug: 176940922 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com> Change-Id: Ie447860290f4fbc1e03ad8ae5f50bd02121756cb
This commit is contained in:
parent
39fedc3a58
commit
4e98107b8c
3 changed files with 23 additions and 0 deletions
|
|
@ -165,6 +165,9 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_prepare_command);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_update_sysfs);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_command);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_compl_command);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_uic_command);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_tm_command);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_check_int_errors);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_wake_up_sync);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_wake_flags);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_uclamp_eff_value);
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
|
|||
int off = (int)tag - hba->nutrs;
|
||||
struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[off];
|
||||
|
||||
trace_android_vh_ufs_send_tm_command(hba, tag, str);
|
||||
trace_ufshcd_upiu(dev_name(hba->dev), str, &descp->req_header,
|
||||
&descp->input_param1);
|
||||
}
|
||||
|
|
@ -336,6 +337,8 @@ static void ufshcd_add_uic_command_trace(struct ufs_hba *hba,
|
|||
{
|
||||
u32 cmd;
|
||||
|
||||
trace_android_vh_ufs_send_uic_command(hba, ucmd, str);
|
||||
|
||||
if (!trace_ufshcd_uic_command_enabled())
|
||||
return;
|
||||
|
||||
|
|
@ -5044,6 +5047,7 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
|
|||
} else if (lrbp->command_type == UTP_CMD_TYPE_DEV_MANAGE ||
|
||||
lrbp->command_type == UTP_CMD_TYPE_UFS_STORAGE) {
|
||||
if (hba->dev_cmd.complete) {
|
||||
trace_android_vh_ufs_compl_command(hba, lrbp);
|
||||
ufshcd_add_command_trace(hba, index,
|
||||
"dev_complete");
|
||||
complete(hba->dev_cmd.complete);
|
||||
|
|
@ -6132,6 +6136,8 @@ static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba)
|
|||
queue_eh_work = true;
|
||||
}
|
||||
|
||||
trace_android_vh_ufs_check_int_errors(hba, queue_eh_work);
|
||||
|
||||
if (queue_eh_work) {
|
||||
/*
|
||||
* update the transfer error masks to sticky bits, let's do this
|
||||
|
|
|
|||
|
|
@ -36,6 +36,20 @@ DECLARE_HOOK(android_vh_ufs_compl_command,
|
|||
TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp),
|
||||
TP_ARGS(hba, lrbp));
|
||||
|
||||
struct uic_command;
|
||||
DECLARE_HOOK(android_vh_ufs_send_uic_command,
|
||||
TP_PROTO(struct ufs_hba *hba, struct uic_command *ucmd,
|
||||
const char *str),
|
||||
TP_ARGS(hba, ucmd, str));
|
||||
|
||||
DECLARE_HOOK(android_vh_ufs_send_tm_command,
|
||||
TP_PROTO(struct ufs_hba *hba, int tag, const char *str),
|
||||
TP_ARGS(hba, tag, str));
|
||||
|
||||
DECLARE_HOOK(android_vh_ufs_check_int_errors,
|
||||
TP_PROTO(struct ufs_hba *hba, bool queue_eh_work),
|
||||
TP_ARGS(hba, queue_eh_work));
|
||||
|
||||
#endif /* _TRACE_HOOK_UFSHCD_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue