Commit a70e33ea authored by Luo Jiaxing's avatar Luo Jiaxing Committed by Martin K. Petersen

scsi: hisi_sas: Allocate memory for multiple dumps of debugfs

We add multiple dumps for debugfs, but only allocate memory this time and
only dump #0.

Link: https://lore.kernel.org/r/1571926105-74636-15-git-send-email-john.garry@huawei.comSigned-off-by: default avatarLuo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 357e4fc7
...@@ -323,6 +323,8 @@ struct hisi_sas_hw { ...@@ -323,6 +323,8 @@ struct hisi_sas_hw {
const struct hisi_sas_debugfs_reg *debugfs_reg_port; const struct hisi_sas_debugfs_reg *debugfs_reg_port;
}; };
#define HISI_SAS_MAX_DEBUGFS_DUMP (50)
struct hisi_sas_debugfs_cq { struct hisi_sas_debugfs_cq {
struct hisi_sas_cq *cq; struct hisi_sas_cq *cq;
void *complete_hdr; void *complete_hdr;
...@@ -440,15 +442,16 @@ struct hisi_hba { ...@@ -440,15 +442,16 @@ struct hisi_hba {
/* debugfs memories */ /* debugfs memories */
/* Put Global AXI and RAS Register into register array */ /* Put Global AXI and RAS Register into register array */
struct hisi_sas_debugfs_regs debugfs_regs[DEBUGFS_REGS_NUM]; struct hisi_sas_debugfs_regs debugfs_regs[HISI_SAS_MAX_DEBUGFS_DUMP][DEBUGFS_REGS_NUM];
struct hisi_sas_debugfs_port debugfs_port_reg[HISI_SAS_MAX_PHYS]; struct hisi_sas_debugfs_port debugfs_port_reg[HISI_SAS_MAX_DEBUGFS_DUMP][HISI_SAS_MAX_PHYS];
struct hisi_sas_debugfs_cq debugfs_cq[HISI_SAS_MAX_QUEUES]; struct hisi_sas_debugfs_cq debugfs_cq[HISI_SAS_MAX_DEBUGFS_DUMP][HISI_SAS_MAX_QUEUES];
struct hisi_sas_debugfs_dq debugfs_dq[HISI_SAS_MAX_QUEUES]; struct hisi_sas_debugfs_dq debugfs_dq[HISI_SAS_MAX_DEBUGFS_DUMP][HISI_SAS_MAX_QUEUES];
struct hisi_sas_debugfs_iost debugfs_iost; struct hisi_sas_debugfs_iost debugfs_iost[HISI_SAS_MAX_DEBUGFS_DUMP];
struct hisi_sas_debugfs_itct debugfs_itct; struct hisi_sas_debugfs_itct debugfs_itct[HISI_SAS_MAX_DEBUGFS_DUMP];
struct hisi_sas_debugfs_iost_cache debugfs_iost_cache[HISI_SAS_MAX_DEBUGFS_DUMP];
struct hisi_sas_debugfs_itct_cache debugfs_itct_cache[HISI_SAS_MAX_DEBUGFS_DUMP];
u64 debugfs_timestamp; u64 debugfs_timestamp;
struct hisi_sas_debugfs_iost_cache debugfs_iost_cache;
struct hisi_sas_debugfs_itct_cache debugfs_itct_cache;
struct dentry *debugfs_dir; struct dentry *debugfs_dir;
struct dentry *debugfs_dump_dentry; struct dentry *debugfs_dump_dentry;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment