From b0b3e4290e288bb633c4ff6331b2c0b9530aa9b8 Mon Sep 17 00:00:00 2001 From: Luo Jiaxing Date: Mon, 5 Aug 2019 21:48:02 +0800 Subject: scsi: hisi_sas: Snapshot AXI and RAS register at debugfs The AXI and RAS register values should also should be snapshot at debugfs. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen --- drivers/scsi/hisi_sas/hisi_sas.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/hisi_sas/hisi_sas.h') diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 5a2fbbbed53e..fd998d07ffcd 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -259,6 +259,13 @@ struct hisi_sas_iost_itct_cache { u32 data[HISI_SAS_IOST_ITCT_CACHE_DW_SZ]; }; +enum hisi_sas_debugfs_reg_array_member { + DEBUGFS_GLOBAL = 0, + DEBUGFS_AXI, + DEBUGFS_RAS, + DEBUGFS_REGS_NUM +}; + enum hisi_sas_debugfs_cache_type { HISI_SAS_ITCT_CACHE, HISI_SAS_IOST_CACHE, @@ -312,7 +319,7 @@ struct hisi_sas_hw { int complete_hdr_size; struct scsi_host_template *sht; - const struct hisi_sas_debugfs_reg *debugfs_reg_global; + const struct hisi_sas_debugfs_reg *debugfs_reg_array[DEBUGFS_REGS_NUM]; const struct hisi_sas_debugfs_reg *debugfs_reg_port; }; @@ -388,7 +395,8 @@ struct hisi_hba { unsigned int *reply_map; /* debugfs memories */ - u32 *debugfs_global_reg; + /* Put Global AXI and RAS Register into register array */ + u32 *debugfs_regs[DEBUGFS_REGS_NUM]; u32 *debugfs_port_reg[HISI_SAS_MAX_PHYS]; void *debugfs_complete_hdr[HISI_SAS_MAX_QUEUES]; struct hisi_sas_cmd_hdr *debugfs_cmd_hdr[HISI_SAS_MAX_QUEUES]; -- cgit v1.2.3