summaryrefslogtreecommitdiff
path: root/drivers/scsi/hisi_sas/hisi_sas.h
diff options
context:
space:
mode:
authorLuo Jiaxing <luojiaxing@huawei.com>2019-10-24 22:08:21 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-10-24 21:31:15 -0400
commita70e33eae363e6f3e2ad9498daaccd231790f7f5 (patch)
treed1b32ff3921eb8492d3c4601dea2667da5a47319 /drivers/scsi/hisi_sas/hisi_sas.h
parent357e4fc7a933ed5bfbf1eb2fad9c198afe6a11e1 (diff)
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.com 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.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index a608b2bef0b4..b4c6bec4b92c 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -323,6 +323,8 @@ struct hisi_sas_hw {
const struct hisi_sas_debugfs_reg *debugfs_reg_port;
};
+#define HISI_SAS_MAX_DEBUGFS_DUMP (50)
+
struct hisi_sas_debugfs_cq {
struct hisi_sas_cq *cq;
void *complete_hdr;
@@ -440,15 +442,16 @@ struct hisi_hba {
/* debugfs memories */
/* Put Global AXI and RAS Register into register array */
- struct hisi_sas_debugfs_regs debugfs_regs[DEBUGFS_REGS_NUM];
- struct hisi_sas_debugfs_port debugfs_port_reg[HISI_SAS_MAX_PHYS];
- struct hisi_sas_debugfs_cq debugfs_cq[HISI_SAS_MAX_QUEUES];
- struct hisi_sas_debugfs_dq debugfs_dq[HISI_SAS_MAX_QUEUES];
- struct hisi_sas_debugfs_iost debugfs_iost;
- struct hisi_sas_debugfs_itct debugfs_itct;
+ 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_DEBUGFS_DUMP][HISI_SAS_MAX_PHYS];
+ 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_DEBUGFS_DUMP][HISI_SAS_MAX_QUEUES];
+ struct hisi_sas_debugfs_iost debugfs_iost[HISI_SAS_MAX_DEBUGFS_DUMP];
+ 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;
- 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_dump_dentry;