diff options
author | Luo Jiaxing <luojiaxing@huawei.com> | 2018-12-19 18:56:39 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-01-09 05:58:37 +0300 |
commit | ef63464bcf8feaa793e1aee4d3d186dfd1fff05f (patch) | |
tree | 25a8cf81ed2b3a26451dc5d7ed60eac97c2602b0 /drivers/scsi/hisi_sas/hisi_sas.h | |
parent | ad796f790cc2db13d3899107b19aae4b439a2f9b (diff) | |
download | linux-ef63464bcf8feaa793e1aee4d3d186dfd1fff05f.tar.xz |
scsi: hisi_sas: Create root and device debugfs directories
This patch creates root directory at hisi_sas_init() and generates device
directory when we probe device driver.
And we remove the root directory at hisi_sas_exit(), but recursively
delete device directory when we remove device driver.
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas.h')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index af291947a54d..3ad87462593b 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -14,6 +14,7 @@ #include <linux/acpi.h> #include <linux/clk.h> +#include <linux/debugfs.h> #include <linux/dmapool.h> #include <linux/iopoll.h> #include <linux/lcm.h> @@ -332,6 +333,8 @@ struct hisi_hba { u32 phy_state; u32 intr_coal_ticks; /* Time of interrupt coalesce in us */ u32 intr_coal_count; /* Interrupt count to coalesce */ + + struct dentry *debugfs_dir; }; /* Generic HW DMA host memory structures */ @@ -461,6 +464,10 @@ struct hisi_sas_slot_buf_table { }; extern struct scsi_transport_template *hisi_sas_stt; + +extern bool hisi_sas_debugfs_enable; +extern struct dentry *hisi_sas_debugfs_dir; + extern void hisi_sas_stop_phys(struct hisi_hba *hisi_hba); extern int hisi_sas_alloc(struct hisi_hba *hisi_hba, struct Scsi_Host *shost); extern void hisi_sas_free(struct hisi_hba *hisi_hba); @@ -493,4 +500,6 @@ extern void hisi_sas_release_tasks(struct hisi_hba *hisi_hba); extern u8 hisi_sas_get_prog_phy_linkrate_mask(enum sas_linkrate max); extern void hisi_sas_controller_reset_prepare(struct hisi_hba *hisi_hba); extern void hisi_sas_controller_reset_done(struct hisi_hba *hisi_hba); +extern void hisi_sas_debugfs_init(struct hisi_hba *hisi_hba); +extern void hisi_sas_debugfs_exit(struct hisi_hba *hisi_hba); #endif |