From 966284567f964015aa537f487db24eceef951aba Mon Sep 17 00:00:00 2001 From: Yaniv Gardi Date: Tue, 9 Jun 2015 10:22:26 +0300 Subject: scsi: ufs-debug: add debugfs capability to collect query statistics This patch adds a new debugfs capability to collect query statistics. It counts how many times each IDN (index) was sent to device for each query opcode. A usage example: 1. to clean current query statistics: echo 1 > /d/ufshcd0/stats/query_stats 2. to dump the current query statistics: cat /d/ufshcd0/stats/query_stats This capability is always on, and can not be turned off. Change-Id: I46ec405aae480c0dc161dca015b407bde6335cf7 Signed-off-by: Yaniv Gardi --- include/uapi/scsi/ufs/ufs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/uapi/scsi') diff --git a/include/uapi/scsi/ufs/ufs.h b/include/uapi/scsi/ufs/ufs.h index 894ea453737f..4b9a0049639d 100644 --- a/include/uapi/scsi/ufs/ufs.h +++ b/include/uapi/scsi/ufs/ufs.h @@ -1,6 +1,8 @@ #ifndef UAPI_UFS_H_ #define UAPI_UFS_H_ +#define MAX_QUERY_IDN 0x12 + /* Flag idn for Query Requests*/ enum flag_idn { QUERY_FLAG_IDN_FDEVICEINIT = 0x01, @@ -62,5 +64,6 @@ enum query_opcode { UPIU_QUERY_OPCODE_SET_FLAG = 0x6, UPIU_QUERY_OPCODE_CLEAR_FLAG = 0x7, UPIU_QUERY_OPCODE_TOGGLE_FLAG = 0x8, + UPIU_QUERY_OPCODE_MAX, }; #endif /* UAPI_UFS_H_ */ -- cgit v1.2.3