summaryrefslogtreecommitdiff
path: root/include/trace/events/ufs.h
diff options
context:
space:
mode:
authorOhad Sharabi <ohad.sharabi@sandisk.com>2018-03-28 12:42:18 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-19 06:37:39 +0300
commit6667e6d91c88a788d5ab1b1e999d245473e84a90 (patch)
treee327d812aeb947cb75657eabd2587f7544082f9d /include/trace/events/ufs.h
parent4d79e7d0f0cfe22c05c21a1008fa000f153119aa (diff)
downloadlinux-6667e6d91c88a788d5ab1b1e999d245473e84a90.tar.xz
scsi: ufs: add trace event for ufs upiu
Add UFS Protocol Information Units(upiu) trace events for ufs driver, used to trace various ufs transaction types- command, task-management and device management. The trace-point format is generic and can be easily adapted to trace other upius if needed. Currently tracing ufs transaction of type 'device management', which this patch introduce, cannot be obtained from any other trace. Device management transactions are used for communication with the device such as reading and writing descriptor or attributes etc. Signed-off-by: Ohad Sharabi <ohad.sharabi@sandisk.com> Reviewed-by: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/trace/events/ufs.h')
-rw-r--r--include/trace/events/ufs.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
index bf6f82673492..f8260e5c79ad 100644
--- a/include/trace/events/ufs.h
+++ b/include/trace/events/ufs.h
@@ -257,6 +257,33 @@ TRACE_EVENT(ufshcd_command,
)
);
+TRACE_EVENT(ufshcd_upiu,
+ TP_PROTO(const char *dev_name, const char *str, void *hdr, void *tsf),
+
+ TP_ARGS(dev_name, str, hdr, tsf),
+
+ TP_STRUCT__entry(
+ __string(dev_name, dev_name)
+ __string(str, str)
+ __array(unsigned char, hdr, 12)
+ __array(unsigned char, tsf, 16)
+ ),
+
+ TP_fast_assign(
+ __assign_str(dev_name, dev_name);
+ __assign_str(str, str);
+ memcpy(__entry->hdr, hdr, sizeof(__entry->hdr));
+ memcpy(__entry->tsf, tsf, sizeof(__entry->tsf));
+ ),
+
+ TP_printk(
+ "%s: %s: HDR:%s, CDB:%s",
+ __get_str(str), __get_str(dev_name),
+ __print_hex(__entry->hdr, sizeof(__entry->hdr)),
+ __print_hex(__entry->tsf, sizeof(__entry->tsf))
+ )
+);
+
#endif /* if !defined(_TRACE_UFS_H) || defined(TRACE_HEADER_MULTI_READ) */
/* This part must be outside protection */