Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit faf66608 authored by Yaniv Gardi's avatar Yaniv Gardi
Browse files

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: default avatarYaniv Gardi <ygardi@codeaurora.org>
parent ed3d0eb5
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -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,
+1 −0
Original line number Diff line number Diff line
@@ -456,6 +456,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;