scsi: ufs-debugfs: create statistics folder

In this patch a new folder is created under the debugfs/ufshcd<x>
root folder, in which all statistics information is located and collected.

Change-Id: I3ea68a7c75b8252b6ad8487ff927e0fe520242e4
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
This commit is contained in:
Yaniv Gardi 2015-06-08 17:45:10 +03:00 committed by David Keitel
parent d0d9231d23
commit 88abe3727b
2 changed files with 14 additions and 5 deletions

View file

@ -1464,22 +1464,30 @@ void ufsdbg_add_debugfs(struct ufs_hba *hba)
goto err_no_root;
}
hba->debugfs_files.stats_folder = debugfs_create_dir("stats",
hba->debugfs_files.debugfs_root);
if (!hba->debugfs_files.stats_folder) {
dev_err(hba->dev,
"%s: NULL stats_folder, exiting", __func__);
goto err;
}
hba->debugfs_files.tag_stats =
debugfs_create_file("tag_stats", S_IRUSR | S_IWUSR,
hba->debugfs_files.debugfs_root, hba,
hba->debugfs_files.stats_folder, hba,
&ufsdbg_tag_stats_fops);
if (!hba->debugfs_files.tag_stats) {
dev_err(hba->dev, "%s: NULL tag stats file, exiting",
dev_err(hba->dev, "%s: NULL tag_stats file, exiting",
__func__);
goto err;
}
hba->debugfs_files.err_stats =
debugfs_create_file("err_stats", S_IRUSR | S_IWUSR,
hba->debugfs_files.debugfs_root, hba,
hba->debugfs_files.stats_folder, hba,
&ufsdbg_err_stats_fops);
if (!hba->debugfs_files.err_stats) {
dev_err(hba->dev, "%s: NULL err stats file, exiting",
dev_err(hba->dev, "%s: NULL err_stats file, exiting",
__func__);
goto err;
}
@ -1561,7 +1569,7 @@ void ufsdbg_add_debugfs(struct ufs_hba *hba)
hba->debugfs_files.req_stats =
debugfs_create_file("req_stats", S_IRUSR | S_IWUSR,
hba->debugfs_files.debugfs_root, hba,
hba->debugfs_files.stats_folder, hba,
&ufsdbg_req_stats_desc);
if (!hba->debugfs_files.req_stats) {
dev_err(hba->dev,

View file

@ -464,6 +464,7 @@ struct ufs_uic_err_reg_hist {
#ifdef CONFIG_DEBUG_FS
struct debugfs_files {
struct dentry *debugfs_root;
struct dentry *stats_folder;
struct dentry *tag_stats;
struct dentry *err_stats;
struct dentry *show_hba;