From c61163981076476e0bcf2d453dcddf8db605f115 Mon Sep 17 00:00:00 2001 From: Luo Jiaxing Date: Thu, 24 Oct 2019 22:08:15 +0800 Subject: scsi: hisi_sas: Add debugfs file structure for registers Create a file structure which was used to save the memory address and hisi_hba pointer for REGS at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it need. Link: https://lore.kernel.org/r/1571926105-74636-9-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen --- drivers/scsi/hisi_sas/hisi_sas.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (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 91c10be3dfb7..1c01e0e76a0e 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -333,6 +333,11 @@ struct hisi_sas_debugfs_dq { struct hisi_sas_cmd_hdr *hdr; }; +struct hisi_sas_debugfs_regs { + struct hisi_hba *hisi_hba; + u32 *data; +}; + struct hisi_hba { /* This must be the first element, used by SHOST_TO_SAS_HA */ struct sas_ha_struct *p; @@ -414,7 +419,7 @@ struct hisi_hba { /* debugfs memories */ /* Put Global AXI and RAS Register into register array */ - u32 *debugfs_regs[DEBUGFS_REGS_NUM]; + struct hisi_sas_debugfs_regs debugfs_regs[DEBUGFS_REGS_NUM]; u32 *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]; -- cgit v1.2.3